Critical Vulnerability in Samlify Library Exposes Admin Accounts to Takeover Attacks

Listen to this Post

Featured Image
In a recent cybersecurity alert, a severe vulnerability has been uncovered in Samlify, a widely used Node.js authentication library. The flaw, identified as CVE-2025-47949, exposes a serious security gap that allows attackers to bypass authentication and impersonate admin users — potentially compromising entire systems. With over 200,000 weekly downloads, the issue is not just theoretical but a high-priority risk for organizations relying on SAML-based Single Sign-On (SSO).

Dangerous Auth Bypass in Samlify: What You Need to Know

Samlify is a powerful authentication library designed to simplify the integration of SAML SSO and Single Logout functionalities into Node.js applications. It plays a key role in enabling developers and enterprises to connect applications with major identity providers like Okta and Azure AD. However, a critical Signature Wrapping vulnerability has been discovered in all Samlify versions prior to 2.10.0, which scores 9.9 on the CVSS v4.0 scale — putting it in the most severe category.

The vulnerability stems from how Samlify handles SAML responses. While the library verifies that the XML document is signed, it does not fully validate all parts of that document. Specifically, it processes unsigned malicious assertions embedded within otherwise valid, signed XML structures. An attacker can inject a fake assertion that impersonates an admin account. The service provider (SP), relying on the flawed parsing logic, accepts this assertion and grants unauthorized access.

This attack requires no user interaction or privileged access. All the attacker needs is a valid signed SAML response, which can be intercepted or obtained from public metadata. From there, they modify the response by inserting their own malicious data without invalidating the signature. This enables complete SSO bypass and privilege escalation, allowing attackers to log in as any user, including administrators.

EndorLabs, the security firm that uncovered the issue, demonstrated that the vulnerability allows unsigned data to be processed ahead of signed assertions, effectively turning the core trust mechanism of SAML on its head. Immediate mitigation involves upgrading to Samlify 2.10.0, which addresses this critical flaw. It’s important to note that while GitHub still lists version 2.9.1 as the latest, npm hosts the secure 2.10.0 version.

Although there have been no confirmed cases of real-world exploitation yet, the simplicity of the attack and the popularity of the library mean users should not delay patching.

What Undercode Say:

This Samlify vulnerability is not just another security bug — it’s a clear warning about the risks embedded in the core mechanics of identity verification systems. The breach targets the very foundation of trust in SSO environments: digital signatures. The fact that attackers can hijack signed XML responses and insert malicious data without invalidating the signature speaks volumes about the depth of the flaw.

SAML was designed with robust security intentions, but its complexity often leads to parsing logic errors. Samlify’s misstep here is an example of how even well-adopted libraries can fall short. By prioritizing signature validation over holistic XML structure integrity, the library creates a loophole that attackers can easily exploit.

What makes this issue more dangerous is its ease of execution. The attacker doesn’t need a foothold inside the target’s network. Access to any signed XML — which can sometimes be publicly available or intercepted through man-in-the-middle attacks — is enough to start an attack chain. Once they manipulate that XML, the application essentially opens the door for them, believing it’s dealing with a legitimate administrator.

The scale of risk is massive. Think about SaaS platforms, internal dashboards, and enterprise applications that rely on Samlify for federated identity. A compromised admin session could lead to data theft, configuration tampering, or full infrastructure control.

Another pressing concern is the misalignment in available versions. Developers relying on GitHub may mistakenly assume version 2.9.1 is secure, while the actual patched version is on npm. This can result in a false sense of security for those who have not cross-checked their dependencies. It highlights a broader ecosystem issue where version discrepancies can delay critical patches.

In the broader picture, this also demonstrates the need for better defense-in-depth strategies. Relying solely on the authenticity of SAML assertions without validating the full document chain is no longer safe. DevSecOps teams must implement deeper inspection of third-party libraries and automated dependency scanning to catch such flaws early.

As attackers get more sophisticated and tools become more accessible, even complex exploits like SAML wrapping are now within reach of moderately skilled adversaries. Organizations cannot afford to wait for public proof-of-concept (PoC) releases or reports of exploitation in the wild. Preemptive action is the only viable defense.

Fact Checker Results:

✅ The flaw affects all versions before 2.10.0

✅ No active exploitation reported so far

✅ Exploitation is possible without user interaction or privileges 🔐

Prediction:

Given the severity and simplicity of this exploit, it’s likely that threat actors will begin probing applications using vulnerable Samlify versions in the coming weeks. We anticipate this vulnerability could be weaponized in targeted attacks against enterprise SaaS platforms and internal tools that rely heavily on federated identity systems. Expect cybersecurity vendors to release signatures and detection rules for this vulnerability, while security researchers may publish PoCs to demonstrate real-world risks. Developers and IT teams should act swiftly before this flaw becomes a common tool in the attacker’s playbook.

References:

Reported By: www.bleepingcomputer.com
Extra Source Hub:
https://www.twitter.com
Wikipedia
Undercode AI

Image Source:

Unsplash
Undercode AI DI v2

Join Our Cyber World:

💬 Whatsapp | 💬 Telegram