CVE-2025-27773 is a high-severity security vulnerability in simplesamlphp/saml2 (composer), affecting versions >= 5.0.0-alpha.1, <= 5.0.0-alpha.19. It is fixed in 5.0.0-alpha.20, 4.17.0.
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.
CVE-2025-27773 has a CVSS score of 8.6 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.
A fixed version is available (5.0.0-alpha.20, 4.17.0). Upgrading removes the vulnerable code path.
composer
simplesamlphp/saml2 (>= 5.0.0-alpha.1, <= 5.0.0-alpha.19)simplesamlphp/saml2 (<= 4.16.15)simplesamlphp/saml2-legacy (<= 4.16.15)simplesamlphp/saml2 → 5.0.0-alpha.20 (composer)simplesamlphp/saml2 → 4.17.0 (composer)simplesamlphp/saml2-legacy → 4.17.0 (composer)Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.
Kodem's runtime-powered SCA identifies whether CVE-2025-27773 is reachable in your applications. Explore open-source security for your team.
See if CVE-2025-27773 is reachable in your applications. Get a demo
Already deployed Kodem? See CVE-2025-27773 in your environment →Upgrade the following packages to resolve this vulnerability:
simplesamlphp/saml2 to 5.0.0-alpha.20 or latersimplesamlphp/saml2 to 4.17.0 or latersimplesamlphp/saml2-legacy to 4.17.0 or laterKodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
CVE-2025-27773 is a high-severity security vulnerability in simplesamlphp/saml2 (composer), affecting versions >= 5.0.0-alpha.1, <= 5.0.0-alpha.19. It is fixed in 5.0.0-alpha.20, 4.17.0.
CVE-2025-27773 has a CVSS score of 8.6 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
simplesamlphp/saml2 (composer) (versions >= 5.0.0-alpha.1, <= 5.0.0-alpha.19)simplesamlphp/saml2-legacy (composer) (versions <= 4.16.15)Yes. CVE-2025-27773 is fixed in 5.0.0-alpha.20, 4.17.0. Upgrade to this version or later.
Whether CVE-2025-27773 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
simplesamlphp/saml2 to 5.0.0-alpha.20 or latersimplesamlphp/saml2 to 4.17.0 or latersimplesamlphp/saml2-legacy to 4.17.0 or later