CVE-2025-25291
ruby-saml vulnerable to SAML authentication bypass due to DOCTYPE handling (parser differential)
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 fix the issue.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
9.3
ruby-saml vulnerable to SAML authentication bypass due to DOCTYPE handling (parser differential)
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 fix the issue.
- Record
CVE-2025-25291- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-347, CWE-436
- Updated
- 2026-11-02
EUVDEUVD-2025-6415
9.3
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 fix the issue.
- Record
EUVD-2025-6415- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-4vc4-m8qh-g8jm
9.3
Ruby SAML allows a SAML authentication bypass due to DOCTYPE handling (parser differential)
Summary
An authentication bypass vulnerability was found in ruby-saml 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.
Impact
This issue may lead to authentication bypass.
- Record
GHSA-4vc4-m8qh-g8jm- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-347, CWE-436
- Updated
- 2026-11-02
NVD
9.3
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 fix the issue.
- Record
CVE-2025-25291- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-347, CWE-436
- Updated
- 2026-11-02
OSV
9.3
ruby-saml vulnerable to SAML authentication bypass due to DOCTYPE handling (parser differential)
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 fix the issue.
- Record
CVE-2025-25291- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-347, CWE-436
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2025-25291
9.8
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 fix the issue.
- Record
DEBIAN-CVE-2025-25291- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 4 moreShow less
OSVGHSA-4vc4-m8qh-g8jm
9.3
Ruby SAML allows a SAML authentication bypass due to DOCTYPE handling (parser differential)
Summary
An authentication bypass vulnerability was found in ruby-saml 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.
Impact
This issue may lead to authentication bypass.
- Record
GHSA-4vc4-m8qh-g8jm- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-347, CWE-436
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2025-25291
9.3
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 fix the issue.
- Record
UBUNTU-CVE-2025-25291- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVBIT-gitlab-2025-25291 No score
ruby-saml vulnerable to SAML authentication bypass due to DOCTYPE handling (parser differential)
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 fix the issue.
- Record
BIT-gitlab-2025-25291- Updated
- 2026-11-02
OSVUSN-7409-1 No score
ruby-saml vulnerabilities
It was discovered that ruby-saml did not correctly handle XML parsing. An attacker could possibly use this issue to perform a signature wrapping attack and bypass authentication. (CVE-2025-25291 and CVE-2025-25292)
It was discovered that ruby-saml did not correctly handle decompressing SAML responses. An attacker could possibly use this issue to cause a denial of service. (CVE-2025-25293)
- Record
USN-7409-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
ruby-samlRubyGems |
before 1.12.4 | 1.12.4 |
ruby-samlRubyGems |
1.13.0 up to 1.18.0 | 1.18.0 |
gitlabBitnami |
before 17.9.2 | 17.9.2 |
ruby-samlDebian:12 |
All versions, plus listed versions 1.13.0-11.13.0-1+deb12u11.15.0-11.17.0-1 |
None known |
ruby-samlDebian:11 From an advisory covering 3 CVEs |
before 1.11.0-1+deb11u2, plus listed versions 1.11.0-11.11.0-1+deb11u1 |
1.11.0-1+deb11u2 |
ruby-samlRubyGems |
before 1.12.4, plus listed versions 0.0.50.0.60.0.70.0.80.2.1 Show 45 moreShow less0.2.20.2.30.3.00.3.10.3.20.3.30.3.40.4.00.4.10.4.20.4.30.4.40.4.50.4.60.4.70.5.00.5.10.5.20.5.30.6.00.7.00.7.10.7.20.7.30.8.00.8.10.8.100.8.110.8.120.8.130.8.140.8.150.8.160.8.170.8.180.8.20.8.30.8.40.8.50.8.60.8.70.8.80.8.90.90.9.1 |
1.12.4 |
ruby-samlRubyGems |
1.13.0 up to 1.18.0, plus listed versions 1.14.01.15.01.16.01.17.0 |
1.18.0 |
ruby-samlUbuntu:Pro:16.04:LTS |
All versions, plus listed versions 0.9.2-11.0.0-11.1.2-1ubuntu11.1.2-1ubuntu1+esm11.1.2-1ubuntu1+esm2 |
None known |
ruby-samlUbuntu:Pro:18.04:LTS |
before 1.7.2-1ubuntu0.1~esm2, plus listed versions 1.4.1-11.7.2-11.7.2-1ubuntu0.1~esm1 |
1.7.2-1ubuntu0.1~esm2 |
ruby-samlUbuntu:Pro:20.04:LTS |
before 1.11.0-1ubuntu0.1+esm1, plus listed versions 1.7.2-11.11.0-11.11.0-1ubuntu0.1 |
1.11.0-1ubuntu0.1+esm1 |
Show 7 moreShow less
| Package | Affected | Fixed |
|---|---|---|
ruby-samlUbuntu:Pro:22.04:LTS |
before 1.13.0-1ubuntu0.1+esm1, plus listed versions 1.11.0-11.13.0-11.13.0-1ubuntu0.1 |
1.13.0-1ubuntu0.1+esm1 |
ruby-samlUbuntu:Pro:24.04:LTS |
before 1.15.0-1ubuntu0.24.04.1+esm1, plus listed versions 1.15.0-11.15.0-1ubuntu0.24.04.1 |
1.15.0-1ubuntu0.24.04.1+esm1 |
ruby-samlUbuntu:Pro:16.04:LTS From an advisory covering 3 CVEs |
before 1.1.2-1ubuntu1+esm2, plus listed versions 0.9.2-11.0.0-11.1.2-1ubuntu11.1.2-1ubuntu1+esm1 |
1.1.2-1ubuntu1+esm2 |
ruby-samlUbuntu:Pro:18.04:LTS From an advisory covering 3 CVEs |
before 1.7.2-1ubuntu0.1~esm2, plus listed versions 1.4.1-11.7.2-11.7.2-1ubuntu0.1~esm1 |
1.7.2-1ubuntu0.1~esm2 |
ruby-samlUbuntu:Pro:20.04:LTS From an advisory covering 3 CVEs |
before 1.11.0-1ubuntu0.1+esm1, plus listed versions 1.7.2-11.11.0-11.11.0-1ubuntu0.1 |
1.11.0-1ubuntu0.1+esm1 |
ruby-samlUbuntu:Pro:22.04:LTS From an advisory covering 3 CVEs |
before 1.13.0-1ubuntu0.1+esm1, plus listed versions 1.11.0-11.13.0-11.13.0-1ubuntu0.1 |
1.13.0-1ubuntu0.1+esm1 |
ruby-samlUbuntu:Pro:24.04:LTS From an advisory covering 3 CVEs |
before 1.15.0-1ubuntu0.24.04.1+esm1, plus listed versions 1.15.0-11.15.0-1ubuntu0.24.04.1 |
1.15.0-1ubuntu0.24.04.1+esm1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-25291 is a critical vulnerability (CVSS 9.3) in Omniauth Saml, published March 12, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 21.0%, the 97th percentile. Fixed in ruby-saml 1.12.4.
References
github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-4vc4-m8qh-g8jm
github.com/omniauth/omniauth-saml/security/advisories/GHSA-hw46-3hmr-x9xv
github.com/SAML-Toolkits/ruby-saml/commit/e76c5b36bac40aedbf1ba7ffaaf495be63328cd9
github.com/SAML-Toolkits/ruby-saml/commit/e9c1cdbd0f9afa467b585de279db0cbd0fb8ae97
about.gitlab.com/releases/2025/03/12/patch-release-gitlab-17-9-2-released
github.blog/security/sign-in-as-anyone-bypassing-saml-sso-authentication-with-parser-differentials
Show 18 moreShow less
github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.12.4
github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.18.0
portswigger.net/research/saml-roulette-the-hacker-always-wins
securitylab.github.com/advisories/GHSL-2024-329_GHSL-2024-330_ruby-saml
security.netapp.com/advisory/ntap-20250314-0010
news.ycombinator.com/item?id=43374519
lists.debian.org/debian-lts-announce/2025/04/msg00011.html
nvd.nist.gov/vuln/detail/CVE-2025-25291
github.com/rubysec/ruby-advisory-db/blob/master/gems/ruby-saml/CVE-2025-25291.yml
github.com/advisories/GHSA-4vc4-m8qh-g8jm
github.com/CVEProject/cvelistV5/tree/main/cves/2025/25xxx/CVE-2025-25291.json
security-tracker.debian.org/tracker/CVE-2025-25291
github.com/SAML-Toolkits/ruby-saml
ubuntu.com/security/CVE-2025-25291
cve.org/CVERecord?id=CVE-2025-25291
ubuntu.com/security/notices/USN-7409-1
ubuntu.com/security/CVE-2025-25292
ubuntu.com/security/CVE-2025-25293
Left out here: 31 versions. The JSON record has them.