CVE-2025-25291
JSON

9.3critical

ruby-saml vulnerable to SAML authentication bypass due to DOCTYPE handling (parser differential)

Severity
9.3critical CVSS:4.0 by GitHub_M
Exploit likelihood
34.4% (higher than 98% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-4vc4-m8qh-g8jmBIT-GITLAB-2025-25291

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.

Affected

Product or packageVersionsReported by
SAML-Toolkits ruby-saml< 1.12.4, >= 1.13.0, < 1.18.0CVE List
ruby-saml (RubyGems)before 1.12.4, from 1.13.0 before 1.18.0GitHub Advisory Database
omniauth omniauth_samlbefore 1.10.6, from 2.0.0 before 2.1.3, from 2.2.0 before 2.2.3NVD
onelogin ruby-samlbefore 1.12.4, from 1.13.0 before 1.18.0NVD
netapp storagegridNot specifiedNVD
gitlab (Bitnami)before 17.9.2Bitnami Vulnerability Database

All scores

GitHub_M9.3critical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHubcritical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Bitnami Vulnerability Databasecritical rating

Classification

CWE-347CWE-436

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database
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.

NVD (es)

ruby-saml proporciona inicio de sesión único (SSO) con lenguaje de marcado para aserciones de seguridad (SAML) para Ruby. Se detectó una vulnerabilidad de omisión de autenticación en ruby-saml anterior a las versiones 1.12.4 y 1.18.0 debido a una diferencia en el analizador. ReXML y Nokogiri analizan XML de forma diferente; los analizadores pueden generar estructuras de documento completamente distintas a partir de la misma entrada XML. Esto permite a un atacante ejecutar un ataque de envoltura de firma. Este problema puede provocar la omisión de autenticación. Las versiones 1.12.4 y 1.18.0 solucionan el problema.

References

https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-4vc4-m8qh-g8jmadvisory, vendor-advisory, web
https://github.com/omniauth/omniauth-saml/security/advisories/GHSA-hw46-3hmr-x9xvadvisory, vendor-advisory, web
https://github.com/SAML-Toolkits/ruby-saml/commit/e76c5b36bac40aedbf1ba7ffaaf495be63328cd9fix, patch, web
https://github.com/SAML-Toolkits/ruby-saml/commit/e9c1cdbd0f9afa467b585de279db0cbd0fb8ae97fix, patch, web
https://about.gitlab.com/releases/2025/03/12/patch-release-gitlab-17-9-2-releasedfix, patch, web
https://github.blog/security/sign-in-as-anyone-bypassing-saml-sso-authentication-with-parser-differentialsadvisory, exploit, third-party-advisory, web
https://github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.12.4article, release-notes, web
https://github.com/SAML-Toolkits/ruby-saml/releases/tag/v1.18.0article, release-notes, web
https://portswigger.net/research/saml-roulette-the-hacker-always-winsadvisory, exploit, third-party-advisory, web
https://securitylab.github.com/advisories/GHSL-2024-329_GHSL-2024-330_ruby-samladvisory, third-party-advisory
https://security.netapp.com/advisory/ntap-20250314-0010/advisory, third-party-advisory
https://news.ycombinator.com/item?id=43374519issue-tracking, report, web

Sources

SourceRecordLicence
CVE ListCVE-2025-25291 changed 2025-11-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-4vc4-m8qh-g8jm changed 2026-02-04CC-BY-4.0
NVDCVE-2025-25291 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-GITLAB-2025-25291 changed 2026-09-08Apache-2.0