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.63 - 2023-02-03

  • Significant Changes since 0.62
    • Maintenance release that has a number of fixes for small issues. This is the first release in some time that has been tested for SOAP connections and SOAP Artifacts. The testapp has been updated to fix SOAP and the Shibboleth and samltest.id IdPs.
    • Minimum Perl version has been bumped to 5.12
    • Contributors and authors set automatically
    • Add Shibboleth and samltest.id as supported IdPs
    • Allow encryption certificate in SP metadata
    • LogoutRequest was missing NameQualifier and SPNameQualifier needed by some IdPs
    • Fix bug in obtaining Assertion dates and message id and improve id validation
    • Fix multiple SOAP issues including support for multiple certs in metadata
    • New Net::SAML2::Protocol::Artifact to access parts of the ArtifactResponse
    • Allow obtaining assertion substatus and allow assertions without NameID
    • testapp:
      • allow untrusted TLS SOAP connections
      • read key and cert from config.yml
      • fix metadata generation issues and make signing optional
      • only enable logout bindings supported by IdP
      • allow for custom attribute mapping by IdP
      • Support for Shibboleth and samltest.id IdPs
  • Change Log
    • 8d0b962 use Moose is equivalent to use strict
    • faf3ec7 Update for release 0.63
    • 1688e1c Add XsdID as a type for id attribute type checking
    • fc6a199 Get the substatus of a failed assertion
    • 3c9e4fc Create a Artifact to hold the parts of the Artifact
    • 36652dc Fixes perl-net-saml2#152 - Incorrect id set on messages from XML
    • 33d9985 Allow assertion without a NameID
    • 6a140ca Get the correct dates from the assertions
    • 3d291ff testapp: allow attribute mapping by IdP
    • 60a3592 testapp: only enable supported IdP logout bindings
    • cfc5351 Add Shibboleth and samltest.id as supported IdPs
    • c81e384 Fix LogoutRequest's missing NameQualifier and SPNameQualifier for samletest.id
    • cf8991a remove eol spaces
    • ade3fed testapp: signed metadat messes with testing - make it an option
    • 571f7a9 testapp Fix issue in metadata generation missing fully qualified URI
    • 01424dd testapp: key and cert should be read from config and missed https options
    • 787bd1f Allow encryption key to be specified in the metadata.xml
    • f6740e4 testapp: allow SOAP connections to untrusted SSL servers
    • eb48fa8 SOAP Some IdPs have issues with newlines in SOAP-ENV
    • 83e30e1 SOAP binding should support multiple certs in the IdP Metadata Use Try::Tiny to handle exceptions
    • ef2472d Install Sub::Name without running tests
    • dffc8c8 Test::Deep requires perl 5.012 and newer
    • e213bae New Year advance Copyright
    • 9f8b287 Set sane default values for testing testapp
    • bf27ae9 Bump version to .63
    • b782aa7 Set authors and contributors
    • 013a0c6 Update contributors and reorder alphabetically
    • d268c0f Add missing Credit for Gianni in 0.62

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::SOAP - SOAP binding for SAML
Net::SAML2::IdP - SAML Identity Provider object
Net::SAML2::Protocol::Artifact - SAML2 artifact 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
A role to verify the SAML response XML
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