CVE-2025-25291: Ruby SAML allows a SAML authentication bypass due to DOCTYPE handling (parser differential)
Affects ruby-samlSource GCVE Database
Not known to be exploited · CVSS 9.3 Critical : upgrade to 1.12.4 as a priority.
Data as of 30 Oct 2026, 01:18 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 4.0 | 9.3 |
|---|
- Patch
- Available – fixed in 1.12.4, 1.18.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 12 Mar 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Upgrade ruby-saml to 1.12.4; ruby-saml to 1.18.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| RubyGemsruby-saml | Affected
| Fixed in
|
| RubyGemsruby-saml | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Apply the official patches by upgrading ruby-saml to version 1.12.4 or later, or to version 1.18.0 or later, as these versions contain fixes for the vulnerability. No other mitigation is indicated by the vendor advisory.
Description
A critical authentication bypass vulnerability exists in ruby-saml due to differences in XML parsing between ReXML and Nokogiri. This parser differential allows attackers to perform a Signature Wrapping attack, potentially bypassing authentication mechanisms. The vulnerability affects ruby-saml versions prior to 1.12.4 and versions from 1.13.0 up to but not including 1.18.0. Fixed versions 1.12.4 and 1.18.0 address this issue.
References
- github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-4vc4-m8qh-g8jm (opens in a new tab)
- github.com/omniauth/omniauth-saml/security/advisories/GHSA-hw46-3hmr-x9xv (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2025-25291 (opens in a new tab)
- github.com/SAML-Toolkits/ruby-saml/commit/e76c5b36bac40aedbf1ba7ffaaf495be63328cd9 (opens in a new tab)
- github.com/SAML-Toolkits/ruby-saml/commit/e9c1cdbd0f9afa467b585de279db0cbd0fb8ae97 (opens in a new tab)
- about.gitlab.com/releases/2025/03/12/patch-release-gitlab-17-9-2-released (opens in a new tab)
- github.blog/security/sign-in-as-anyone-bypassing-saml-sso-authentication-with-parser-differentials (opens in a new tab)
- github.com/SAML-Toolkits/ruby-saml (opens in a new tab)
- github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.12.4 (opens in a new tab)
- github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.18.0 (opens in a new tab)
- github.com/rubysec/ruby-advisory-db/blob/master/gems/ruby-saml/CVE-2025-25291.yml (opens in a new tab)
- lists.debian.org/debian-lts-announce/2025/04/msg00011.html (opens in a new tab)
- news.ycombinator.com/item?id=43374519 (opens in a new tab)
- portswigger.net/research/saml-roulette-the-hacker-always-wins (opens in a new tab)
- security.netapp.com/advisory/ntap-20250314-0010 (opens in a new tab)
- securitylab.github.com/advisories/GHSL-2024-329_GHSL-2024-330_ruby-saml (opens in a new tab)