CRITICAL9.8
GHSA-4vc4-m8qh-g8jm
Ruby SAML allows a SAML authentication bypass due to DOCTYPE handling (parser differential)
Quick fix
GHSA-4vc4-m8qh-g8jm — ruby-saml: upgrade to the fixed version with the command below.
bundle update ruby-samlDetails
### 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.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
- https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-4vc4-m8qh-g8jm[WEB]
- https://github.com/omniauth/omniauth-saml/security/advisories/GHSA-hw46-3hmr-x9xv[WEB]
- https://nvd.nist.gov/vuln/detail/CVE-2025-25291[ADVISORY]
- https://github.com/SAML-Toolkits/ruby-saml/commit/e76c5b36bac40aedbf1ba7ffaaf495be63328cd9[WEB]
- https://github.com/SAML-Toolkits/ruby-saml/commit/e9c1cdbd0f9afa467b585de279db0cbd0fb8ae97[WEB]
- https://about.gitlab.com/releases/2025/03/12/patch-release-gitlab-17-9-2-released[WEB]
- https://github.blog/security/sign-in-as-anyone-bypassing-saml-sso-authentication-with-parser-differentials[WEB]
- https://github.com/SAML-Toolkits/ruby-saml[PACKAGE]
- https://github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.12.4[WEB]
- https://github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.18.0[WEB]
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/ruby-saml/CVE-2025-25291.yml[WEB]
- https://lists.debian.org/debian-lts-announce/2025/04/msg00011.html[WEB]
- https://news.ycombinator.com/item?id=43374519[WEB]
- https://portswigger.net/research/saml-roulette-the-hacker-always-wins[WEB]
- https://security.netapp.com/advisory/ntap-20250314-0010[WEB]
- https://securitylab.github.com/advisories/GHSL-2024-329_GHSL-2024-330_ruby-saml[ADVISORY]