CVE-2026-18092: Net::SAML2 versions before 0.86 for Perl allow SAML authentication bypass via XML signature wrapping because new_from_xml reads assertion identity with document-wide XPath instead of the signed subtree
Net::SAML2 versions before 0.86 for Perl allow SAML authentication bypass via XML signature wrapping because newfromxml reads assertion identity with document-wide XPath instead of the signed subtree.
newfromxml reads the NameID, attribute values, SessionIndex, audience and other identity fields with document-wide XPath, such as //saml:Assertion/saml:AttributeStatement/saml:Attribute and //saml:Subject/saml:NameID, which select the first matching element in document order rather than the element covered by the verified signature. handleresponse confirms that a signature is present and, when a cacert is configured, that it chains to the CA, but XML::Sig verifies only the element named by the signature's Reference URI, so unsigned sibling assertions in the same document are not covered. An attacker who holds any one IdP-signed assertion can add an unsigned attacker-authored assertion earlier in document order; the signature still verifies and the document-order XPath returns the attacker's NameID and attributes.
Any caller that passes an untrusted Response to newfromxml can accept identity fields from an assertion the IdP never signed, even when a cacert trust anchor is configured, so a party holding one valid IdP-signed assertion can authenticate as an arbitrary user.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Net::SAML2 (Perl)to a version that resolves this vulnerability.Fixed in 0.86 - Compensating control
Ensure callers do not pass untrusted SAML Responses into Net::SAML2 new_from_xml; only process responses from a trusted IdP so identity fields cannot be taken from assertions the IdP never signed (especially when unsigned sibling assertions are present).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-18092?
The severity of CVE-2026-18092 is rated at 80, indicating a high risk associated with the vulnerability.
How do I fix CVE-2026-18092?
To fix CVE-2026-18092, upgrade to Net::SAML2 version 0.86 or later.
What does CVE-2026-18092 allow an attacker to do?
CVE-2026-18092 allows an attacker to bypass SAML authentication via XML signature wrapping.
Which versions of Net::SAML2 are affected by CVE-2026-18092?
CVE-2026-18092 affects all versions of Net::SAML2 prior to 0.86.
What is the underlying issue in CVE-2026-18092?
The underlying issue in CVE-2026-18092 is that new_from_xml reads assertion identity using document-wide XPath instead of the signed subtree.