CVE-2026-18108
JSON

9.8critical

Net::SAML2 versions before 0.86 for Perl allow authentication bypass because _verify_encrypted_assertion accepts an EncryptedAssertion whose decrypted content carries no signature

Severity
9.8critical CVSS:3.1 by CISA-ADP
Exploit likelihood
0.22% (higher than 13% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
CPANSec

Description

Net::SAML2 versions before 0.86 for Perl allow authentication bypass because _verify_encrypted_assertion accepts an EncryptedAssertion whose decrypted content carries no signature. _verify_encrypted_assertion decrypts the EncryptedAssertion and returns it as verified when it carries no signature, via "return $xml unless $xpath->exists('dsig:Signature', $assert);". The signature check and the trust anchor check that follow run only when a signature is present, so a decrypted assertion with no dsig:Signature element reaches new_from_xml unverified and its NameID and attributes are read into the assertion object. An SP's encryption certificate is published in its SAML metadata so the IdP can encrypt to it, so any party can encrypt an unsigned assertion to that certificate, wrap it in a samlp:Response, and post it to the assertion consumer service. Any caller that configures a decryption key_file, and so accepts EncryptedAssertions, takes identity fields from an assertion that no trust anchor covers, and an unauthenticated party can authenticate as an arbitrary user. Callers with no key_file configured do not decrypt and are unaffected.

Affected

Product or packageVersionsReported by
Net-SAML2before 0.86CVE List
timlegge net::saml2before 0.86NVD

Classification

CWE-347

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

Net::SAML2 versions before 0.86 for Perl allow authentication bypass because _verify_encrypted_assertion accepts an EncryptedAssertion whose decrypted content carries no signature. _verify_encrypted_assertion decrypts the EncryptedAssertion and returns it as verified when it carries no signature, via "return $xml unless $xpath->exists('dsig:Signature', $assert);". The signature check and the trust anchor check that follow run only when a signature is present, so a decrypted assertion with no dsig:Signature element reaches new_from_xml unverified and its NameID and attributes are read into the assertion object. An SP's encryption certificate is published in its SAML metadata so the IdP can encrypt to it, so any party can encrypt an unsigned assertion to that certificate, wrap it in a samlp:Response, and post it to the assertion consumer service. Any caller that configures a decryption key_file, and so accepts EncryptedAssertions, takes identity fields from an assertion that no trust anchor covers, and an unauthenticated party can authenticate as an arbitrary user. Callers with no key_file configured do not decrypt and are unaffected.

NVD (es)

Las versiones de Net::SAML2 anteriores a la 0.86 para Perl permiten la omisión de autenticación porque _verify_encrypted_assertion acepta una EncryptedAssertion cuyo contenido descifrado no lleva firma. _verify_encrypted_assertion descifra la EncryptedAssertion y la devuelve como verificada cuando no lleva firma, a través de “return $xml unless $xpath -> exists(’dsig:Signature’, $assert);”. La comprobación de firma y la comprobación de anclaje de confianza que le siguen se ejecutan solo cuando hay una firma presente, por lo que una aserción descifrada sin un elemento dsig:Signature llega a new_from_xml sin verificar y su NameID y atributos se leen en el objeto de aserción. El certificado de cifrado de un SP se publica en sus metadatos SAML para que el IdP pueda cifrar a él, por lo que cualquier parte puede cifrar una aserción sin firmar a ese certificado, envolverla en una samlp:Response y publicarla en el servicio de consumidor de aserciones. Cualquier llamador que configure un archivo de clave de descifrado, y por lo tanto acepta EncryptedAssertions, toma campos de identidad de una aserción que ningún anclaje de confianza cubre, y una parte no autenticada puede autenticarse como un usuario arbitrario. Los llamadores sin un key_file configurado no descifran y no se ven afectados.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-18108 changed 2026-08-03CVE Terms of Use
NVDCVE-2026-18108 changed 2026-10-23Public domain