Security Advisories (3)
CVE-2026-18089 (2026-08-03)

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.

CVE-2026-18092 (2026-08-03)

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.

CVE-2026-18108 (2026-08-03)

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.

Changes for version 0.58 - 2022-08-12

  • Significant Changes since 0.57
    • You will want to test this release. There are numerous changes and improvements but nothing that obviously breaks functionality.
    • Numerous fixes and cleanups thanks to Wesley Schwengle (waterkip)
    • Allow error URI to be a full fledged URI (waterkip)
    • id is now 32 bytes of randomness (was 16) (waterkip)
    • SAML2 constants moved to URN::OASIS::SAML2 (waterkip)
    • Add Indexes to the assertion_consumer_service (waterkip)
    • Refactor and improve SOAP support (waterkip)
    • Allow injecting own LWP::UserAgent to IdP new_from_url (waterkip)
  • Change Log
    • a245b94 Add test for lowercase url escaping
    • ba0a803 Fix author tests with dzil
    • 97898a2 fix pod for Assertion->nameid_format
    • 523ba92 Add missing POD for nameid, nameid_format in Protocol::Assertion
    • fb3085d Update Changes for 0.57
    • 6c63ed1 Make attributes in NameID optional
    • d69b7dd Install sub::name first to prevent pipeline failures
    • 7310b6c Bump version string post .57 release
    • 8b83b3e Make params optional in Binding::Redirect for SAMLResponse
    • 3b2b96b Use cpm instead of cpanminus
    • bc7eb07 nameid_format cannot be a zero length string
    • 1c5af31 Be able to inject own LWP::UserAgent to IdP new_from_url
    • 2abeb49 Add license to distro
    • 3f7c673 Install deps manually
    • 7f400a0 Install deps manually
    • 14c075c Fix documentation and general code cleanup
    • ca9fce1 Small refactor on Protocol::AuthnRequest
    • 14fb479 Add builder to Binding::SOAP for LWP::UA
    • 70ac5d0 Refactor Binding::SOAP::request
    • 830275f Add nameid as a node so we can get the value and/or the format
    • 066100f Really make provider optional in Protocol::ArtifactResolve
    • 5673bb5 v0.56
    • 3c7f390 Set version in main module for downstream developers
    • 22dbf06 Remove Dockerfile, we have github actions now
    • 18fa0ed Add defaults to Net::SAML2::Binding::Redirect
    • 6fe4bdc Fix contributers automaticly from git
    • 1348af5 Add the index in the assertion_consumer_service
    • 02ab7be Make cacert optional in Net::SAML2::SP
    • 858dc57 Remove setting default format when not present in metadata
    • 9e7c88a Introduce URN_XXX constants in NET::SAML2::SP
    • b2e3020 Change from 16 to 32 bytes of randomness
    • 42159bc Allow error URI to be a full fledged URI

Documentation

Modules

SAML2 bindings and protocol implementation
Net::SAML2::Binding::POST - HTTP POST binding for SAML
Net::SAML2::Binding::Redirect - HTTP Redirect binding for SAML
Net::SAML2::Binding::Artifact - SOAP binding for SAML
Net::SAML2::IdP - SAML Identity Provider object
Net::SAML2::Protocol::ArtifactResolve - ArtifactResolve protocol class
Net::SAML2::Protocol::Assertion - SAML2 assertion object
SAML2 AuthnRequest object
SAML2 LogoutRequest Protocol object
SAML2 LogoutResponse Protocol object
Common behaviour for Protocol messages
Net::SAML2::SP - SAML Service Provider object
Custom Moose types for Net::SAML2
Utility functions for Net:SAML2
Net::SAML2 subclass of XML::Sig
Net::SAML2::XML::Util - XML Util class