Summary
CVE-2026-86304 is a critical SAML authentication bypass vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting MojoX::Authentication, a Perl module that provides SAML2-based login for Mojolicious applications. Versions before 0.006 fail to configure a trust anchor when validating SAML responses, allowing a remote, unauthenticated attacker to forge a self-signed SAML assertion and impersonate any user. The flaw carries a CVSS v3.1 base score of 9.8 (Critical).
Technical details
- Root cause: The
parse_assertionfunction inMojoX::Authentication::Model::SAML2constructs aNet::SAML2::Binding::POSTobject without supplying acacert,cert_text, oranchorsargument (i.e., no trust anchor). It then passes the parsed XML toNet::SAML2::Protocol::Assertion->new_from_xml, supplying the IdP signing certificate ascacert. - Underlying library behavior: In
Net::SAML2versions before 0.86, thecacertsupplied toAssertion->new_from_xmlis only enforced against encrypted assertions. For unencrypted assertions, signature verification falls back to validating against the X.509 certificate embedded in the response’s ownKeyInfo/X509Certificateelement — meaning the response is effectively validated against a key the attacker controls. - Attack vector: Network (AV:N), no privileges or user interaction required. An attacker initiates a SAML login flow and submits a SAML response signed with their own, self-generated certificate. Because the audience restriction,
InResponseTo, and timestamp checks that follow signature validation are all satisfiable by an attacker who controls the entire forged response, the assertion is accepted as valid. - Impact: Complete authentication bypass — an attacker can authenticate as any user (including privileged accounts) by supplying an arbitrary
NameIDin a self-signed assertion, leading to full compromise of confidentiality, integrity, and availability of the protected application. - Related issue: This bypass is closely tied to a companion vulnerability in the underlying
Net::SAML2library itself (fixed in Net::SAML2 0.86), whereBinding::POSTandAssertionverification routines permitted signature checks to succeed against unanchored, response-supplied certificates when no trust anchor was configured by the caller.
Affected software
- MojoX::Authentication (CPAN, Perl) — all versions prior to 0.006 (versions 0 through 0.005)
- Deployments remain exposed even on patched MojoX::Authentication if the underlying Net::SAML2 dependency is older than 0.86, since that library’s trust-anchor enforcement is part of the overall fix chain.
Severity
- CVSS v3.1 Base Score: 9.8 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate: Upgrade
MojoX::Authenticationto version 0.006 or later (released July 31, 2026), which correctly supplies a trust anchor when building the SAML binding/assertion validation path. - Dependency upgrade required: Ensure the underlying
Net::SAML2library is also upgraded to version 0.86 or later. This release makes a trust anchor (cacert/cert_text) mandatory for verifying any Response or Assertion and closes the unanchored-signature validation path; note this is a breaking change for any code that previously relied on the permissive default. - If immediate patching is not possible: Installing
Net::SAML20.86 or later alone will cause affected SAML logins to fail closed (rather than accept forged assertions), acting as an interim workaround untilMojoX::Authenticationcan be upgraded. - Defense in depth: After patching, consider enabling the new opt-in
require_signed_assertionandrequire_signed_responseoptions introduced in Net::SAML2 0.86, and audit SAML SP configurations to confirm a trust anchor (IdP certificate) is explicitly configured wherever SAML responses or assertions are parsed.

