Ruby SAML vulnerable to SAML authentication bypass due to namespace handling (parser differential)
Description
ruby-saml provides security assertion markup language (SAML) single sign-on (SSO) for Ruby. An authentication bypass vulnerability was found in ruby-saml prior to versions 1.12.4 and 1.18.0 due to a parser differential. ReXML and Nokogiri parse XML differently, the parsers can generate entirely different document structures from the same XML input. That allows an attacker to be able to execute a Signature Wrapping attack. This issue may lead to authentication bypass. Versions 1.12.4 and 1.18.0 contain a patch for the issue.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Authentication bypass in ruby-saml due to XML parser differential between ReXML and Nokogiri, enabling signature wrapping attacks; patched in versions 1.12.4 and 1.18.0.
Vulnerability
Overview
CVE-2025-25292 is an authentication bypass vulnerability in the ruby-saml library, which implements SAML single sign-on (SSO) for Ruby. The root cause is a parser differential between ReXML and Nokogiri: these XML parsers can generate entirely different document structures from the same input. This discrepancy allows an attacker to craft a SAML response that is interpreted differently by the two parsers, thereby bypassing signature validation [1][3][4].
Exploitation
To exploit this vulnerability, an attacker must possess a single valid signature that was created with the key used to validate SAML responses or assertions of the targeted organization. With that signature, the attacker can construct a malicious SAML assertion that passes signature validation due to the parser differential, effectively executing a Signature Wrapping attack. No additional authentication is required beyond possession of the valid signature [3].
Impact
Successful exploitation leads to authentication bypass, allowing the attacker to log in as any user of the affected application (account takeover). The vulnerability affects ruby-saml versions prior to 1.12.4 and 1.18.0. Patches are available in versions 1.12.4 and 1.18.0 [1][3][4].
Mitigation
Users should upgrade to ruby-saml 1.12.4 or 1.18.0 immediately. Libraries that depend on ruby-saml, such as omniauth-saml, must also be updated to versions that reference a fixed ruby-saml version [1][3].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
ruby-samlRubyGems | >= 1.13.0, < 1.18.0 | 1.18.0 |
ruby-samlRubyGems | < 1.12.4 | 1.12.4 |
Affected products
1- SAML-Toolkits/ruby-samlv5Range: < 1.12.4
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
16- github.com/advisories/GHSA-754f-8gm6-c4r2ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-25292ghsaADVISORY
- securitylab.github.com/advisories/GHSL-2024-329_GHSL-2024-330_ruby-samlghsax_refsource_MISCADVISORY
- about.gitlab.com/releases/2025/03/12/patch-release-gitlab-17-9-2-releasedghsax_refsource_MISCWEB
- github.blog/security/sign-in-as-anyone-bypassing-saml-sso-authentication-with-parser-differentialsghsax_refsource_MISCWEB
- github.com/SAML-Toolkits/ruby-saml/commit/e76c5b36bac40aedbf1ba7ffaaf495be63328cd9ghsax_refsource_MISCWEB
- github.com/SAML-Toolkits/ruby-saml/commit/e9c1cdbd0f9afa467b585de279db0cbd0fb8ae97ghsax_refsource_MISCWEB
- github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.12.4ghsax_refsource_MISCWEB
- github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.18.0ghsax_refsource_MISCWEB
- github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-754f-8gm6-c4r2ghsax_refsource_CONFIRMWEB
- github.com/omniauth/omniauth-saml/security/advisories/GHSA-hw46-3hmr-x9xvghsax_refsource_MISCWEB
- github.com/rubysec/ruby-advisory-db/blob/master/gems/ruby-saml/CVE-2025-25292.ymlghsaWEB
- lists.debian.org/debian-lts-announce/2025/04/msg00011.htmlghsaWEB
- news.ycombinator.com/itemghsaWEB
- portswigger.net/research/saml-roulette-the-hacker-always-winsghsax_refsource_MISCWEB
- security.netapp.com/advisory/ntap-20250314-0009ghsaWEB
News mentions
2- The Fragile Lock: Novel Bypasses For SAML AuthenticationPortSwigger Research · Dec 10, 2025
- GitLab Critical Patch Release: 17.9.2, 17.8.5, 17.7.7GitLab Security Releases · Mar 12, 2025