Every CVE Search/ Get API key

CVE-2025-27773

SimpleSAMLphp SAML2 library has incorrect signature verification for HTTP-Redirect binding

8.6 HighFix available

The SimpleSAMLphp SAML2 library is a PHP library for SAML2 related functionality. Prior to versions 4.17.0 and 5.0.0-alpha.20, there is a signature confusion attack in the HTTPRedirect binding. An attacker with any signed SAMLResponse via the HTTP-Redirect binding can cause the application to accept an unsigned message. Versions 4.17.0 and 5.0.0-alpha.20 contain a fix for the issue.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
High
Availability
None

Exploit likelihood

0.41%Up 0.4 points since Mar 12, 2025
90%50%10%1%

What each source reports

CVE List Score used 8.6

SimpleSAMLphp SAML2 library has incorrect signature verification for HTTP-Redirect binding

The SimpleSAMLphp SAML2 library is a PHP library for SAML2 related functionality. Prior to versions 4.17.0 and 5.0.0-alpha.20, there is a signature confusion attack in the HTTPRedirect binding. An attacker with any signed SAMLResponse via the HTTP-Redirect binding can cause the application to accept an unsigned message. Versions 4.17.0 and 5.0.0-alpha.20 contain a fix for the issue.

Record
CVE-2025-27773
CVSS 3.1
8.6 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
Weakness
CWE-347
Updated
2026-11-02
EUVDEUVD-2025-7804 8.6

The SimpleSAMLphp SAML2 library is a PHP library for SAML2 related functionality. Prior to versions 4.17.0 and 5.0.0-alpha.20, there is a signature confusion attack in the HTTPRedirect binding. An attacker with any signed SAMLResponse via the HTTP-Redirect binding can cause the application to accept an unsigned message. Versions 4.17.0 and 5.0.0-alpha.20 contain a fix for the issue.

Record
EUVD-2025-7804
CVSS 3.1
8.6 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-46r4-f8gj-xg56 8.6

The SimpleSAMLphp SAML2 library incorrectly verifies signatures for HTTP-Redirect binding

Summary

There's a signature confusion attack in the HTTPRedirect binding. An attacker with any signed SAMLResponse via the HTTP-Redirect binding can cause the application to accept an unsigned message.

I believe that it exists for v4 only. I have not yet developed a PoC.

V5 is well designed and instead builds the signed query from the same message that will be consumed.

Details

What is verified

The data['SignedQuery'] is the string that will be verified by the public key.

It is defined here: https://github.com/simplesamlphp/saml2/blob/9545abd0d9d48388f2fa00469c5c1e0294f0303e/src/SAML2/HTTPRedirect.php#L178-L217

THe code will iterate through each parameter name. Notably, sigQuery is overridden each time when processing, making the last of SAMLRequest/SAMLResponse used for sigQuery.

For example, given:

SAMLRequest=a&SAMLResponse=idpsigned

SAMLResponse=idpsigned will be set as sigQuery, then later verified

What is actually processed

Processing uses SAMLRequest parameter value first, (if it exists) then SAMLResponse:

https://github.com/simplesamlphp/saml2/blob/9545abd0d9d48388f2fa00469c5c1e0294f0303e/src/SAML2/HTTPRedirect.php#L104-L113

Given this, the contents that are processed might not be the same as the data that is actually verified.

Exploiting

Suppose an attacker has a signed HTTP Redirect binding from IdP, say a signed logout response. :

SAMLResponse=idpsigned&RelayState=...&SigAlg=...&Signature

Then an attacker can append SAMLRequest in front:

SAMLRequest=unverifieddata&SAMLResponse=idpsigned&RelayState=...&SigAlg=...&Signature=..

SimpleSAMLPhp will only verify the SAMLResponse, but will actually use the SAMLRequest contents. The impact here is increased because there's no checks that SAMLRequest actually contains a Request, it could instead contain an Response, which allows the attacker to effectively impersonate any user within the SP.

IdPs

Microsoft Azure AD/Entra (and likely ADFS) signs the LogoutResponse via this SimpleSign format in HTTP Redirect binding. If an attacker logs out of Entra, they will be able to extract a valid Signature.

Attached is an HTTP Request when an I initiated a SLO request from the service provider to the IdP (entra). Then IdP POSTed this SAMLResponse with HTTP Redirect binding signature, via the user browser to the SP. It should be possible to carry out the described attack with this.

https://webhook.site/c6038292-6ef5-46ac-973d-d7c25520ec48/logout?SAMLResponse=fVJNa%2bMwEP0rRndZtmw5tnAMy%2fYSaC9N6aGXIsmjVMTRGI9M%2bvObdeihsPQ4w7x5HzM9mcs060c84ZqegWaMBNnhYc%2fejS1UW1TAnVU7XldK8s7JkcvOd60Db3zTsewVFgoY90zmBcsORCscIiUT061VyJqXJS%2fbl7LRUmrZ5mXdvLHsASiFaNKG%2fEhpJi3EFewH4jmnkEC4pqha2UnegFe8bozj3a4a%2bbhzUilZgKtbMW2yb7TxW%2foL7lkM9hTC2XnEOPvZXjDECb2N1lh7mvBsp%2bnsErDs8zJF0lsEe7YuUaOhQDqaC5BOTh%2f%2fPD3qmzE9L5jQ4cSGfrO43KG%2fgwwRLP8ssuHbIiXKryGOeKU8QhLSVN7WteejV8Bru%2bt4WynFbwE3bdVV5ahG0Ys759Dfj3VMJq30s%2fqLI2SvZlrhd020Tevj6hwQMTH04udS8b%2bHGL4A&Signature=Z%2f7gIPv7Gkgvqtwo0bzgXyum9IjHMfP0zTYuNbl%2fBUGlQ%2fU%2bbOZGZJ6Rk9wLUyvNQ5XlZRxZrfESNA%2bn0CVyIedsg9GxQKTi7VqPTJFJqEIP1BZaEpYYP3%2f6sFfLxfTMKecJoQdxnDE5Malte1hMj2UujWnLXOnp0CgO%2f%2fU2K52SoGckIzNDRB%2fJ6%2fysTn%2bDjBrmgdro%2fgdTyby9%2f3vm8dzY8pUkRCgMjlimShrZxr5U33wQvwPLIXlDgActr91RUtWKE0k8sy%2brshrK9DKLPo8AdTLk7NYhjSWdF7OG7uqgEeEo470tacqQuA09E0qDh8CWS%2bycLJijiGYWVyQa4Q%3d%3d&SigAlg=http%3a%2f%2fwww.w3.org%2f2001%2f04%2fxmldsig-more%23rsa-sha256
Record
GHSA-46r4-f8gj-xg56
CVSS 3.1
8.6 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
Weakness
CWE-347
Updated
2026-11-02
NVD 8.6

The SimpleSAMLphp SAML2 library is a PHP library for SAML2 related functionality. Prior to versions 4.17.0 and 5.0.0-alpha.20, there is a signature confusion attack in the HTTPRedirect binding. An attacker with any signed SAMLResponse via the HTTP-Redirect binding can cause the application to accept an unsigned message. Versions 4.17.0 and 5.0.0-alpha.20 contain a fix for the issue.

Record
CVE-2025-27773
CVSS 3.1
8.6 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
Weakness
CWE-347
Updated
2026-11-02
OSV 8.6

SimpleSAMLphp SAML2 library has incorrect signature verification for HTTP-Redirect binding

The SimpleSAMLphp SAML2 library is a PHP library for SAML2 related functionality. Prior to versions 4.17.0 and 5.0.0-alpha.20, there is a signature confusion attack in the HTTPRedirect binding. An attacker with any signed SAMLResponse via the HTTP-Redirect binding can cause the application to accept an unsigned message. Versions 4.17.0 and 5.0.0-alpha.20 contain a fix for the issue.

Record
CVE-2025-27773
CVSS 3.1
8.6 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
Weakness
CWE-347
Updated
2026-11-04
OSVDEBIAN-CVE-2025-27773 8.6

The SimpleSAMLphp SAML2 library is a PHP library for SAML2 related functionality. Prior to versions 4.17.0 and 5.0.0-alpha.20, there is a signature confusion attack in the HTTPRedirect binding. An attacker with any signed SAMLResponse via the HTTP-Redirect binding can cause the application to accept an unsigned message. Versions 4.17.0 and 5.0.0-alpha.20 contain a fix for the issue.

Record
DEBIAN-CVE-2025-27773
CVSS 3.1
8.6 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
Updated
2026-11-02
OSVGHSA-46r4-f8gj-xg56 8.6

The SimpleSAMLphp SAML2 library incorrectly verifies signatures for HTTP-Redirect binding

Summary

There's a signature confusion attack in the HTTPRedirect binding. An attacker with any signed SAMLResponse via the HTTP-Redirect binding can cause the application to accept an unsigned message.

I believe that it exists for v4 only. I have not yet developed a PoC.

V5 is well designed and instead builds the signed query from the same message that will be consumed.

Details

What is verified

The data['SignedQuery'] is the string that will be verified by the public key.

It is defined here: https://github.com/simplesamlphp/saml2/blob/9545abd0d9d48388f2fa00469c5c1e0294f0303e/src/SAML2/HTTPRedirect.php#L178-L217

THe code will iterate through each parameter name. Notably, sigQuery is overridden each time when processing, making the last of SAMLRequest/SAMLResponse used for sigQuery.

For example, given:

SAMLRequest=a&SAMLResponse=idpsigned

SAMLResponse=idpsigned will be set as sigQuery, then later verified

What is actually processed

Processing uses SAMLRequest parameter value first, (if it exists) then SAMLResponse:

https://github.com/simplesamlphp/saml2/blob/9545abd0d9d48388f2fa00469c5c1e0294f0303e/src/SAML2/HTTPRedirect.php#L104-L113

Given this, the contents that are processed might not be the same as the data that is actually verified.

Exploiting

Suppose an attacker has a signed HTTP Redirect binding from IdP, say a signed logout response. :

SAMLResponse=idpsigned&RelayState=...&SigAlg=...&Signature

Then an attacker can append SAMLRequest in front:

SAMLRequest=unverifieddata&SAMLResponse=idpsigned&RelayState=...&SigAlg=...&Signature=..

SimpleSAMLPhp will only verify the SAMLResponse, but will actually use the SAMLRequest contents. The impact here is increased because there's no checks that SAMLRequest actually contains a Request, it could instead contain an Response, which allows the attacker to effectively impersonate any user within the SP.

IdPs

Microsoft Azure AD/Entra (and likely ADFS) signs the LogoutResponse via this SimpleSign format in HTTP Redirect binding. If an attacker logs out of Entra, they will be able to extract a valid Signature.

Attached is an HTTP Request when an I initiated a SLO request from the service provider to the IdP (entra). Then IdP POSTed this SAMLResponse with HTTP Redirect binding signature, via the user browser to the SP. It should be possible to carry out the described attack with this.

https://webhook.site/c6038292-6ef5-46ac-973d-d7c25520ec48/logout?SAMLResponse=fVJNa%2bMwEP0rRndZtmw5tnAMy%2fYSaC9N6aGXIsmjVMTRGI9M%2bvObdeihsPQ4w7x5HzM9mcs060c84ZqegWaMBNnhYc%2fejS1UW1TAnVU7XldK8s7JkcvOd60Db3zTsewVFgoY90zmBcsORCscIiUT061VyJqXJS%2fbl7LRUmrZ5mXdvLHsASiFaNKG%2fEhpJi3EFewH4jmnkEC4pqha2UnegFe8bozj3a4a%2bbhzUilZgKtbMW2yb7TxW%2foL7lkM9hTC2XnEOPvZXjDECb2N1lh7mvBsp%2bnsErDs8zJF0lsEe7YuUaOhQDqaC5BOTh%2f%2fPD3qmzE9L5jQ4cSGfrO43KG%2fgwwRLP8ssuHbIiXKryGOeKU8QhLSVN7WteejV8Bru%2bt4WynFbwE3bdVV5ahG0Ys759Dfj3VMJq30s%2fqLI2SvZlrhd020Tevj6hwQMTH04udS8b%2bHGL4A&Signature=Z%2f7gIPv7Gkgvqtwo0bzgXyum9IjHMfP0zTYuNbl%2fBUGlQ%2fU%2bbOZGZJ6Rk9wLUyvNQ5XlZRxZrfESNA%2bn0CVyIedsg9GxQKTi7VqPTJFJqEIP1BZaEpYYP3%2f6sFfLxfTMKecJoQdxnDE5Malte1hMj2UujWnLXOnp0CgO%2f%2fU2K52SoGckIzNDRB%2fJ6%2fysTn%2bDjBrmgdro%2fgdTyby9%2f3vm8dzY8pUkRCgMjlimShrZxr5U33wQvwPLIXlDgActr91RUtWKE0k8sy%2brshrK9DKLPo8AdTLk7NYhjSWdF7OG7uqgEeEo470tacqQuA09E0qDh8CWS%2bycLJijiGYWVyQa4Q%3d%3d&SigAlg=http%3a%2f%2fwww.w3.org%2f2001%2f04%2fxmldsig-more%23rsa-sha256
Record
GHSA-46r4-f8gj-xg56
CVSS 3.1
8.6 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
Weakness
CWE-347
Updated
2026-11-02
OSVUBUNTU-CVE-2025-27773 8.6

The SimpleSAMLphp SAML2 library is a PHP library for SAML2 related functionality. Prior to versions 4.17.0 and 5.0.0-alpha.20, there is a signature confusion attack in the HTTPRedirect binding. An attacker with any signed SAMLResponse via the HTTP-Redirect binding can cause the application to accept an unsigned message. Versions 4.17.0 and 5.0.0-alpha.20 contain a fix for the issue.

Record
UBUNTU-CVE-2025-27773
CVSS 3.1
8.6 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
Updated
2026-11-02
OSVUSN-8770-1 No score

simplesamlphp vulnerabilities

It was discovered that SimpleSAMLphp incorrectly validated cryptographic signatures in XML messages. An authenticated attacker could possibly use this issue to impersonate users or gain elevated privileges. This issue only affected Ubuntu 16.04 LTS and Ubuntu 18.04 LTS. (CVE-2019-3465)

It was discovered that SimpleSAMLphp incorrectly handled external entities when parsing untrusted XML documents. A remote attacker could possibly use this issue to obtain sensitive information. This issue did not affect Ubuntu 24.04 LTS. (CVE-2024-52596)

It was discovered that SimpleSAMLphp incorrectly verified signatures in SAML messages using the HTTP-Redirect binding. A remote attacker could possibly use this issue to bypass authentication and impersonate users. (CVE-2025-27773)

Record
USN-8770-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
simplesamlphp/saml2
Packagist
5.0.0-alpha.1 to 5.0.0-alpha.19
5.0.0-alpha.20
simplesamlphp/saml2
Packagist
through 4.16.15
4.17.0
simplesamlphp/saml2-legacy
Packagist
through 4.16.15
4.17.0
simplesamlphp
Debian:12
before 1.19.7-1+deb12u2, plus listed versions
1.19.7-11.19.7-1+deb12u1
1.19.7-1+deb12u2
simplesamlphp
Debian:14
before 1.19.7-2, plus listed versions
1.10.0-11.11.0-11.12.0-11.12.0~rc1-11.12.0~rc2-1
Show 45 moreShow less
1.13.0-11.13.1-11.13.1-21.13.2-11.14.0-11.14.1-11.14.10-11.14.11-11.14.15-11.14.2-11.14.2-21.14.3-11.14.4-11.14.5-11.14.6-11.14.7-11.14.8-11.14.9-11.15.0-11.15.1-11.15.2-11.15.3-11.15.4-11.16.0-11.16.1-11.16.2-11.16.3-11.17.0-11.17.1-11.17.2-11.17.2-21.17.3-11.17.4-11.17.5-11.17.6-11.17.6-21.18.1-11.18.4-11.18.5-11.18.6-11.18.7-11.18.8-11.19.0-11.19.1-11.19.1-1.1
1.19.7-2
simplesamlphp
Debian:11
before 1.19.0-1+deb11u2, plus listed versions
1.19.0-11.19.0-1+deb11u1
1.19.0-1+deb11u2
simplesamlphp/saml2
Packagist
before 4.17.0, plus listed versions
4.6.9v0.1.0v0.1.0-alphav0.3.0v0.4.0
Show 45 moreShow less
v0.4.1v0.4.2v0.5.0v0.6.0v0.6.1v0.6.2v0.6.3v0.6.4v0.7.0v0.7.1v0.8.0v0.8.1v1.0.0v1.1.0v1.10v1.10.1v1.10.2v1.10.3v1.10.4v1.10.5v1.10.6v1.2.0v1.3.0v1.3.1v1.3.2v1.4.0v1.5.0v1.5.1v1.5.2v1.5.3v1.5.4v1.6.0v1.6.1v1.7.0v1.7.1v1.7.2v1.8v1.8.1v1.8.2v1.9v1.9.1v1.9.2v2.0.0v2.0.1v2.1
4.17.0
simplesamlphp/saml2
Packagist
5.0.0-alpha.1 up to 5.0.0-alpha.20
5.0.0-alpha.20
simplesamlphp/saml2-legacy
Packagist
before 4.17.0, plus listed versions
4.6.9v0.1.0v0.1.0-alphav0.3.0v0.4.0
Show 45 moreShow less
v0.4.1v0.4.2v0.5.0v0.6.0v0.6.1v0.6.2v0.6.3v0.6.4v0.7.0v0.7.1v0.8.0v0.8.1v1.0.0v1.1.0v1.10v1.10.1v1.10.2v1.10.3v1.10.4v1.10.5v1.10.6v1.2.0v1.3.0v1.3.1v1.3.2v1.4.0v1.5.0v1.5.1v1.5.2v1.5.3v1.5.4v1.6.0v1.6.1v1.7.0v1.7.1v1.7.2v1.8v1.8.1v1.8.2v1.9v1.9.1v1.9.2v2.0.0v2.0.1v2.1
4.17.0
simplesamlphp
Ubuntu:Pro:16.04:LTS
before 1.14.0-1ubuntu2+esm1, plus listed versions
1.13.2-11.14.0-11.14.0-1ubuntu2
1.14.0-1ubuntu2+esm1
Show 10 moreShow less
Affected packages
PackageAffectedFixed
simplesamlphp
Ubuntu:Pro:18.04:LTS
before 1.15.3-1ubuntu0.1~esm1, plus listed versions
1.14.15-11.15.0-11.15.1-11.15.2-11.15.3-1
1.15.3-1ubuntu0.1~esm1
simplesamlphp
Ubuntu:Pro:20.04:LTS
before 1.18.4-1ubuntu0.1~esm1, plus listed versions
1.17.5-11.17.6-11.17.6-21.18.1-11.18.4-1
1.18.4-1ubuntu0.1~esm1
simplesamlphp
Ubuntu:Pro:22.04:LTS
before 1.19.1-1.1ubuntu0.1~esm1, plus listed versions
1.19.1-11.19.1-1.1
1.19.1-1.1ubuntu0.1~esm1
simplesamlphp
Ubuntu:24.04:LTS
before 1.19.7-1+deb12u1ubuntu0.1, plus listed versions
1.19.7-1
1.19.7-1+deb12u1ubuntu0.1
simplesamlphp
Ubuntu:25.10
All versions, plus listed versions
1.19.7-1+deb12u11.19.7-2
None known
simplesamlphp
Ubuntu:Pro:16.04:LTS
From an advisory covering 3 CVEs
before 1.14.0-1ubuntu2+esm1, plus listed versions
1.13.2-11.14.0-11.14.0-1ubuntu2
1.14.0-1ubuntu2+esm1
simplesamlphp
Ubuntu:Pro:18.04:LTS
From an advisory covering 3 CVEs
before 1.15.3-1ubuntu0.1~esm1, plus listed versions
1.14.15-11.15.0-11.15.1-11.15.2-11.15.3-1
1.15.3-1ubuntu0.1~esm1
simplesamlphp
Ubuntu:Pro:20.04:LTS
From an advisory covering 3 CVEs
before 1.18.4-1ubuntu0.1~esm1, plus listed versions
1.17.5-11.17.6-11.17.6-21.18.1-11.18.4-1
1.18.4-1ubuntu0.1~esm1
simplesamlphp
Ubuntu:Pro:22.04:LTS
From an advisory covering 3 CVEs
before 1.19.1-1.1ubuntu0.1~esm1, plus listed versions
1.19.1-11.19.1-1.1
1.19.1-1.1ubuntu0.1~esm1
simplesamlphp
Ubuntu:24.04:LTS
From an advisory covering 3 CVEs
before 1.19.7-1+deb12u1ubuntu0.1, plus listed versions
1.19.7-1
1.19.7-1+deb12u1ubuntu0.1

History

History
RecordedChangedSources
affected
factsOSV
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-27773 is a high vulnerability (CVSS 8.6) in Simplesamlphp Saml2, published March 11, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.41%, the 36th percentile. Fixed in simplesamlphp/saml2 5.0.0-alpha.20.

References

Show 8 moreShow less
This page doesn't list everything

Left out here: 208 versions. The JSON record has them.

MoveEnter Open