Samlify bug lets attackers bypass single sign-on

Tags:

A critical vulnerability in the popular samlify library could potentially allow attackers to bypass Single Sign-On (SSO) protections and gain unauthorized access to systems relying on SAML for authentication.

Tracked as CVE-2025-47949, the flaw affecting the widely used Node.js library can allow a Signature Wrapping attack with maximum impact, for which it received a critical rating of CVSS 9.9 out of 10.

“The vulnerability affecting samlify versions prior to 2.10.0 is a severe weakness classified under CWE-347: Improper Verification of Cryptographic Signature,” EndorLabs said in a blog post. “It allows an attacker to forge SAML Responses, leading to complete authentication bypass and arbitrary user impersonation (including administrators).”

Samlify is a library designed to simplify the implementation of SAML 2.0 for Single Sign-On (SSO) and Single Log-Out (SLO) by providing a high-level API. It has over 200,000 weekly downloads on npm and has 62 dependent packages that integrate to it.

Exploiting weak XML signature validation

SAML depends on XML signatures to verify who is who in the authentication handshake between identity providers (IdP) and service providers (SP). But when an SAML parser isn’t strict about what it checks, attackers can take advantage. That’s what happens in a Signature Wrapping attack.

The attack begins with obtaining a valid XML document signed by the identity provider, possibly by intercepting a login session using a man-in-the-middle setup or just grabbing a signature from publicly available IdP metadata.

The attackers then insert a second, fake assertion–claiming to be an admin–into the already obtained, signed XML snippet. Owing to lax parsing rules in samlify versions prior to 2.10.0, the service provider ends up processing the attacker’s fake, unsigned identity along with the original signature.

Endor Labs researchers warned that this flaw opens the door to SAML SSO bypass and is easy to exploit as the “attack complexity is low”, “no privileges are required”, and “no user interaction is needed”. Additionally, the requirement for obtaining a signed XML was noted as “realistic”.

SAML authenticators should update to patched versions

The flaw has been addressed through patches in samlify versions 2.10.0 and later.

Researchers have recommended that systems using SAML authentication must update to a fixed version and ensure “secure SSO flows: implement HTTPS and avoid untrusted sources for SAML flows.”

SAML-powered SSO supports a range of use cases: enterprise applications, SaaS integrations with identity providers like Okta or Azure AD, federated identity across organizations, and developer platforms needing secure user authentication. A full authentication bypass through this flaw could enable attackers to gain access to sensitive resources, private data, or privileged actions under the impersonated identity.

Categories

No Responses

Leave a Reply

Your email address will not be published. Required fields are marked *