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

Impact

Net::SAML2 versions earlier than 0.86 perform certificate validation based solely on the certificate embedded within a SAML response when no external trust anchor is supplied. The verification routine exits early after confirming the response signature, meaning that an attacker can supply a self‑signed certificate in the response’s KeyInfo element and have the library accept it as valid. This flaw allows an attacker to forge authenticated assertions and gain unauthorized access to services that rely on SAML for user authentication.

Affected Systems

The vulnerability impacts Perl modules distributed by TIMLEGGE under the name Net::SAML2, affecting all releases prior to version 0.86. Any installation that does not enforce a trusted certificate store or provide a cacert/cert_text parameter when creating a POST binding or parsing an assertion is vulnerable.

Risk and Exploitability

Exploit is straightforward: an attacker constructs a SAML response signed with an arbitrary key, and the library accepts it without reference to a known trust anchor because none is configured. The CVSS score of 7.5 indicates high severity, capable of compromising authentication mechanisms. The EPSS score is not available, and the issue is not listed in the CISA KEV catalog, but the absence of external validation creates an attractive target for attackers. Proper mitigation requires configuring a valid trust anchor or updating the library.

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

Remediation

Vendor Solution

Upgrade to Net::SAML2 0.86 or later, which requires a cacert or cert_text trust anchor before a response or assertion signature is verified.


Vendor Workaround

For deployments that cannot upgrade, construct Net::SAML2::Binding::POST, and call Net::SAML2::Protocol::Assertion->new_from_xml, with a cacert, cert_text, or anchors argument identifying the IdP signing certificate.


OpenCVE Recommended Actions

  • Upgrade the Net::SAML2 module to version 0.86 or later, which enforces the presence of a cacert or cert_text before verifying any response or assertion signature.
  • Configure the application to supply a trusted certificate chain (cacert or cert_text) on every SAML binding or assertion creation, ensuring that the verification process references known IdP signing certificates.
  • If an upgrade is not immediately possible, apply the documented workaround by constructing a Net::SAML2::Binding::POST object with the cacert, cert_text, or anchors argument pointing to the legitimate IdP signing certificate before invoking Assertion->new_from_xml to enforce proper verification.

Generated by OpenCVE AI on August 4, 2026 at 10:25 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': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N'}

ssvc

{'options': {'Automatable': 'yes', '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 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.
Title 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
Weaknesses CWE-295
CWE-347
References

Subscriptions

Timlegge Net::saml2 Net\
cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-08-03T19:56:33.033Z

Reserved: 2026-07-28T16:26:10.967Z

Link: CVE-2026-18089

cve-icon Vulnrichment

Updated: 2026-08-03T19:56:28.831Z

cve-icon NVD

Status : Analyzed

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

Modified: 2026-08-06T18:36:40.763

Link: CVE-2026-18089

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

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

Weaknesses
  • CWE-295

    Improper Certificate Validation

  • CWE-347

    Improper Verification of Cryptographic Signature