CVE-2025-25291 in the critical feed json
ruby-saml vulnerable to SAML authentication bypass due to DOCTYPE handling (parser differential)
published 2025-03-12 19 mo ago modified 2026-09-08 2 mo ago also BIT-gitlab-2025-25291 , EUVD-2025-6415 , GHSA-4vc4-m8qh-g8jm
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 21.0%
- EPSS 21.0% chance of exploitation in 30 days, percentile 97%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems ruby-saml 1.12.4, 1.18.0
- bitnami gitlab 17.9.2
- onelogin ruby-saml 1.12.4, 1.18.0
- omniauth omniauth_saml 1.10.6, 2.1.3, 2.2.3
- gitlab gitlab 17.7.7, 17.8.5, 17.9.2
- gitlab gitlab_enterprise 17.7.7, 17.8.5, 17.9.2
- ruby-saml Ubuntu Pro 18.04 LTS 1.7.2-1ubuntu0.1~esm2
- ruby-saml Ubuntu Pro 20.04 LTS 1.11.0-1ubuntu0.1+esm1
- ruby-saml Ubuntu Pro 22.04 LTS 1.13.0-1ubuntu0.1+esm1
- ruby-saml Ubuntu Pro 24.04 LTS 1.15.0-1ubuntu0.24.04.1+esm1
ubuntu advisories UBUNTU-CVE-2025-25291
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/SAML-Toolkits/ruby-saml@e76c5b3 commit
- github.com/SAML-Toolkits/ruby-saml@e9c1cdb commit
- about.gitlab.com/releases/2025/03/12/patch-release-gitlab-17-9-2-released patch
- github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.12.4 release
- github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.18.0 release
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- total
- Assessed
- 19 mo ago
Exploit prediction
20.96% chance of exploitation in the next 30 days, higher than 97% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.blog https://github.blog/security/sign-in-as-anyone-bypassing-saml-sso-authentication-with-parser-differentials referenced PoC, tagged "exploit" by a source, unverified
- portswigger.net https://portswigger.net/research/saml-roulette-the-hacker-always-wins referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 9.3 | 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 |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| CNA | 4.0 | 9.3 | 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 |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | ruby-saml | <1.12.4 >=1.13.0, <1.18.0 |
1.12.4 1.18.0 |
| bitnami | gitlab | <17.9.2 |
17.9.2 |
Affected products
- SAML-Toolkits ruby-saml
Classification
- Weakness
- Technology feeds
References
-
github.com
/SAML-Toolkits/ruby-saml/commit/e76c5b36bac40aedbf1ba7ffaaf495be63328cd9
web, patch
-
github.com
/SAML-Toolkits/ruby-saml/commit/e9c1cdbd0f9afa467b585de279db0cbd0fb8ae97
web, patch
-
about.gitlab.com
/releases/2025/03/12/patch-release-gitlab-17-9-2-released
web, patch
-
github.blog
/security/sign-in-as-anyone-bypassing-saml-sso-authentication-with-parser-differentials
web, exploit, third-party-advisory, advisory
-
portswigger.net
/research/saml-roulette-the-hacker-always-wins
web, exploit, third-party-advisory, advisory
-
github.com
/SAML-Toolkits/ruby-saml/security/advisories/GHSA-4vc4-m8qh-g8jm
web, vendor-advisory, advisory
-
github.com
/omniauth/omniauth-saml/security/advisories/GHSA-hw46-3hmr-x9xv
web, vendor-advisory, advisory
-
github.com
/SAML-Toolkits/ruby-saml/releases/tag/v1.12.4
web, release-notes, article
-
github.com
/SAML-Toolkits/ruby-saml/releases/tag/v1.18.0
web, release-notes, article
-
securitylab.github.com
/advisories/GHSL-2024-329_GHSL-2024-330_ruby-saml
advisory, third-party-advisory
-
security.netapp.com
/advisory/ntap-20250314-0010/
third-party-advisory, advisory
-
news.ycombinator.com
/item?id=43374519
web, issue-tracking, report
-
lists.debian.org
/debian-lts-announce/2025/04/msg00011.html
web
-
nvd.nist.gov
/vuln/detail/CVE-2025-25291
advisory, web
-
github.com
/SAML-Toolkits/ruby-saml
package
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/ruby-saml/CVE-2025-25291.yml
web
-
security.netapp.com
/advisory/ntap-20250314-0010
web
Sources
- CVE List CVE-2025-25291
- GitHub Advisory GHSA-4vc4-m8qh-g8jm
- NVD CVE-2025-25291
- OSV BIT-gitlab-2025-25291
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.