Description
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.

new_from_xml 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. handle_response 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 new_from_xml 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.
Published: 2026-08-03
Score: 8.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Net::SAML2 versions before 0.86 allow an attacker to forge a SAML Response that contains an unsigned assertion before a signed IdP‑signable assertion. Because the library extracts identity fields with a document‑wide XPath, the first matching element is returned regardless of the signature coverage. An attacker who can provide an unsigned assertion with an attacker‑chosen NameID and attributes can therefore have the authentication library accept those values as valid identity, bypassing the intended IdP signature verification. This flaw leads to a full authentication bypass, granting the attacker the ability to assume the identity of any user the IdP could assert.

Affected Systems

The vulnerability affects the Perl module Net::SAML2 (TIMLEGGE:Net::SAML2) for all releases prior to version 0.86. Systems using any of these earlier releases to process SAML responses are potentially exploitable, regardless of the operating system or Perl interpreter version.

Risk and Exploitability

The CVSS score is 8.1, indicating a high severity. No EPSS score is published and the vulnerability is not listed in CISA KEV, but the flaw enables a straightforward remote authentication bypass if an untrusted SAML Response can reach the application. The attack requires only that an attacker supply a crafted SAML document that includes both signed and unsigned assertions and that the application calls new_from_xml on the untrusted response. Because the bypass is independent of other conditions, the exploitability is high for affected deployments and the potential impact is total loss of authentication integrity.

Generated by OpenCVE AI on August 4, 2026 at 10:15 UTC.

Remediation

Vendor Solution

Upgrade to Net::SAML2 0.86 or later, which anchors identity extraction at the assertion subtree covered by a signature that validates against the configured trust anchor.


OpenCVE Recommended Actions

  • Apply the official vendor patch by upgrading to Net::SAML2 0.86 or later, which scopes identity extraction to the signed assertion subtree
  • Ensure that the application processes only signed assertions; add logic to verify each assertion is signed before extracting identity fields
  • Modify any custom SAML handling code to avoid document‑wide XPath queries that could return unsigned elements; validate that the referenced signature URI matches the intended assertion

Generated by OpenCVE AI on August 4, 2026 at 10:15 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 03 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 03 Aug 2026 16:15:00 +0000

Type Values Removed Values Added
First Time appeared Timlegge
Timlegge net::saml2
Vendors & Products Timlegge
Timlegge net::saml2

Mon, 03 Aug 2026 13:45:00 +0000

Type Values Removed Values Added
Description 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. new_from_xml 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. handle_response 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 new_from_xml 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.
Title 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
Weaknesses CWE-347
References

Subscriptions

Timlegge Net::saml2 Net\
cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-08-03T20:01:20.742Z

Reserved: 2026-07-28T16:46:56.926Z

Link: CVE-2026-18092

cve-icon Vulnrichment

Updated: 2026-08-03T20:01:16.616Z

cve-icon NVD

Status : Analyzed

Published: 2026-08-03T14:16:25.030

Modified: 2026-08-06T18:37:08.247

Link: CVE-2026-18092

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T10:30:07Z

Weaknesses
  • CWE-347

    Improper Verification of Cryptographic Signature