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

Critical 9.3 Published Updated

An attacker can bypass SAML authentication in ruby-saml by exploiting parser differences to execute a Signature Wrapping attack.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-25291?

CVE-2025-25291 is a critical authentication bypass vulnerability in Netapp Storagegrid, published on 12 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-436, CWE-347

Which versions are affected by CVE-2025-25291?

5 open source packages ship an affected version, including ruby-saml and gitlab. It affects 3 products.

PackageAffectedFixed in
ruby-saml RubyGemsAll versions1.12.4
ruby-saml RubyGemsAll versions1.12.4
ruby-saml RubyGemsFrom 1.13.01.18.0
ruby-saml RubyGemsFrom 1.13.01.18.0
gitlab BitnamiAll versions17.9.2

Products include Netapp Storagegrid, Omniauth Omniauth Saml, Onelogin Ruby-Saml.

How do I fix CVE-2025-25291?

Upgrade ruby-saml to a fixed version for your release line: 1.12.4 or 1.18.0.

Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.

Is CVE-2025-25291 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-25291 exists.

All Netapp Storagegrid vulnerabilities

Sources

Also known as BIT-gitlab-2025-25291, DEBIAN-CVE-2025-25291, GHSA-4vc4-m8qh-g8jm, UBUNTU-CVE-2025-25291.

Is CVE-2025-25291 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free