# CVE-2025-25291: ruby-saml vulnerable to SAML authentication bypass due to DOCTYPE handling (parser differential)

- Severity: Critical 9.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 34.4%, higher than 98% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2025-03-12T20:16:12.181Z
- Modified: 2026-09-08T08:47:44.724Z
- Also known as: GHSA-4vc4-m8qh-g8jm, BIT-GITLAB-2025-25291
- Weaknesses: CWE-347, CWE-436
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## 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 fix the issue.

(As written by CVE List.)

## Affected

- SAML-Toolkits ruby-saml: < 1.12.4; >= 1.13.0, < 1.18.0
- ruby-saml (RubyGems): before 1.12.4; from 1.13.0 before 1.18.0
- omniauth omniauth_saml: before 1.10.6; from 2.0.0 before 2.1.3; from 2.2.0 before 2.2.3
- onelogin ruby-saml: before 1.12.4; from 1.13.0 before 1.18.0
- netapp storagegrid: no versions given
- gitlab (Bitnami): before 17.9.2

## Every score

- GitHub_M: 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`
- GitHub: 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`
- GitHub: CVSS:4.0 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`
- NVD: 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`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://github.blog/security/sign-in-as-anyone-bypassing-saml-sso-authentication-with-parser-differentials> (exploit, advisory, third-party-advisory, web)
- <https://portswigger.net/research/saml-roulette-the-hacker-always-wins> (exploit, advisory, third-party-advisory, web)
- <https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-4vc4-m8qh-g8jm> (advisory, vendor-advisory, web)
- <https://github.com/omniauth/omniauth-saml/security/advisories/GHSA-hw46-3hmr-x9xv> (advisory, vendor-advisory, web)
- <https://github.com/SAML-Toolkits/ruby-saml/commit/e76c5b36bac40aedbf1ba7ffaaf495be63328cd9> (fix, patch, web)
- <https://github.com/SAML-Toolkits/ruby-saml/commit/e9c1cdbd0f9afa467b585de279db0cbd0fb8ae97> (fix, patch, web)
- <https://about.gitlab.com/releases/2025/03/12/patch-release-gitlab-17-9-2-released> (fix, patch, web)
- <https://github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.12.4> (article, release-notes, web)
- <https://github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.18.0> (article, release-notes, web)
- <https://securitylab.github.com/advisories/GHSL-2024-329_GHSL-2024-330_ruby-saml> (advisory, third-party-advisory)
- <https://security.netapp.com/advisory/ntap-20250314-0010/> (advisory, third-party-advisory)
- <https://news.ycombinator.com/item?id=43374519> (issue-tracking, report, web)
- <https://lists.debian.org/debian-lts-announce/2025/04/msg00011.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-25291> (advisory, web)
- <https://github.com/SAML-Toolkits/ruby-saml> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/ruby-saml/CVE-2025-25291.yml> (web)
- <https://security.netapp.com/advisory/ntap-20250314-0010> (web)

## Sources

- CVE List: [CVE-2025-25291](https://www.cve.org/CVERecord?id=CVE-2025-25291), CVE Terms of Use, modified 2025-11-03
- GitHub Advisory Database: [GHSA-4vc4-m8qh-g8jm](https://github.com/advisories/GHSA-4vc4-m8qh-g8jm), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2025-25291](https://nvd.nist.gov/vuln/detail/CVE-2025-25291), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-GITLAB-2025-25291](https://osv.dev/vulnerability/BIT-GITLAB-2025-25291), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2025-25291 · Whole record: https://cve.day/CVE-2025-25291.json · Rebuilt by cve.day 2026-11-25T22:58:55.228Z
