CVE-2025-25291: GHSL-2024-329_GHSL-2024-330: Authentication bypasses in ruby-saml - CVE-2025-25291, CVE-2025-25292
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.
Other sources
GitLab has remediated two privately disclosed security issues (CVE-2025-25291, CVE-2025-25292) identified in the ruby-saml library which GitLab uses when SAML SSO authentication is enabled at the instance or group level. These issues have been remediated on GitLab.com, and in GitLab CE/EE versions 17.7.7, 17.8.5, and 17.9.2.
— GitLab
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.
— NVD
Two different authentication bypasses were found in ruby-saml:
— GitHub Security Lab
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rubygems/ruby-samlto a version that resolves this vulnerability.Fixed in 1.18.0 - Upgrade
Upgrade
rubygems/ruby-samlto a version that resolves this vulnerability.Fixed in 1.12.4 - Upgrade
Upgrade
debian/ruby-samlto a version that resolves this vulnerability.Fixed in 1.11.0-1+deb11u2 - Upgrade
Upgrade
ruby-samlto a version that resolves this vulnerability.Fixed in 1.12.4 - Upgrade
Upgrade
ruby-samlto a version that resolves this vulnerability.Fixed in 1.18.0 - Upgrade
Upgrade
GitLab CE/EEto a version that resolves this vulnerability.Fixed in 17.7.7 - Upgrade
Upgrade
GitLab CE/EEto a version that resolves this vulnerability.Fixed in 17.8.5 - Upgrade
Upgrade
GitLab CE/EEto a version that resolves this vulnerability.Fixed in 17.9.2
Event History
Peer vulnerabilities
Found alongside the following vulnerabilities.
Frequently Asked Questions
What is the severity of CVE-2025-25291?
The severity of CVE-2025-25291 is high due to the potential for authentication bypass.
How do I fix CVE-2025-25291?
To fix CVE-2025-25291, upgrade ruby-saml to versions 1.12.4 or 1.18.0 or later.
What product is affected by CVE-2025-25291?
CVE-2025-25291 affects the ruby-saml library.
What versions of ruby-saml are impacted by CVE-2025-25291?
ruby-saml versions prior to 1.12.4 and between 1.13.0 and 1.18.0 are impacted by CVE-2025-25291.
How does CVE-2025-25291 exploit a parser differential?
CVE-2025-25291 exploits the difference in XML parsing between ReXML and Nokogiri, leading to different document structures.