7.5high
Net::SAML2 versions before 0.86 for Perl allow SAML authentication bypass by verifying responses against the response-embedded certificate in verify_xml when no trust anchor is configured
- Severity
- 7.5high CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.19% (higher than 8% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- CPANSec
Description
Net::SAML2 versions before 0.86 for Perl allow SAML authentication bypass by verifying responses against the response-embedded certificate in verify_xml when no trust anchor is configured. verify_xml in Net::SAML2::Role::VerifyXML runs "return if !$anchors && !$cacert;" as soon as the XML::Sig check succeeds, and that check uses the X.509 certificate taken from the response's own dsig:KeyInfo/dsig:X509Certificate element, so an unanchored response is checked only against the key it carries. Binding::POST declares cacert as an optional Maybe[Str] with no default, so a POST binding built without one takes that path, and _verify_encrypted_assertion returns early the same way with "return $xml unless $cacert;". Any caller that constructs Binding::POST or calls Assertion->new_from_xml without a cacert, cert_text, or anchors argument accepts a response signed by an attacker generated key whose self-signed certificate is embedded in that response, authenticating an arbitrary assertion.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Net-SAML2 | before 0.86 | CVE List |
| timlegge net::saml2 | before 0.86 | NVD |
Classification
What each source says
CVE List
Net::SAML2 versions before 0.86 for Perl allow SAML authentication bypass by verifying responses against the response-embedded certificate in verify_xml when no trust anchor is configured. verify_xml in Net::SAML2::Role::VerifyXML runs "return if !$anchors && !$cacert;" as soon as the XML::Sig check succeeds, and that check uses the X.509 certificate taken from the response's own dsig:KeyInfo/dsig:X509Certificate element, so an unanchored response is checked only against the key it carries. Binding::POST declares cacert as an optional Maybe[Str] with no default, so a POST binding built without one takes that path, and _verify_encrypted_assertion returns early the same way with "return $xml unless $cacert;". Any caller that constructs Binding::POST or calls Assertion->new_from_xml without a cacert, cert_text, or anchors argument accepts a response signed by an attacker generated key whose self-signed certificate is embedded in that response, authenticating an arbitrary assertion.
NVD (es)
Las versiones de Net::SAML2 anteriores a la 0.86 para Perl permiten la omisión de autenticación SAML al verificar las respuestas contra el certificado incrustado en la respuesta en verify_xml cuando no se configura un ancla de confianza. verify_xml en Net::SAML2::Role::VerifyXML ejecuta ’return if !$anchors && !$cacert;’ tan pronto como la verificación de XML::Sig tiene éxito, y esa verificación utiliza el certificado X.509 tomado del propio elemento dsig:KeyInfo/dsig:X509Certificate de la respuesta, por lo que una respuesta sin ancla se verifica solo contra la clave que lleva. Binding::POST declara cacert como un Maybe[Str] opcional sin valor predeterminado, por lo que un enlace POST construido sin uno toma ese camino, y _verify_encrypted_assertion retorna temprano de la misma manera con ’return $xml unless $cacert;’. Cualquier llamador que construya Binding::POST o llame a Assertion -> new_from_xml sin un argumento cacert, cert_text o anchors acepta una respuesta firmada por una clave generada por un atacante cuyo certificado autofirmado está incrustado en esa respuesta, autenticando una aserción arbitraria.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-18089 changed 2026-08-03 | CVE Terms of Use |
| NVD | CVE-2026-18089 changed 2026-10-23 | Public domain |