Vulnerability · Published Mar 12, 2025 · Assigned by GitHub_M

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

Critical 9.3

In plain English

A critical-severity security flaw in ruby-saml from SAML-Toolkits. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 21.0% (higher than 98% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)9.3Critical
Exploit odds (30 days)21.0%top 2.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12ruby-samlno fix listedDEBIAN-CVE-2025-25291
RubyGemsruby-saml1.12.4GHSA-4vc4-m8qh-g8jm
RubyGemsruby-saml1.18.0GHSA-4vc4-m8qh-g8jm

Affected products (as reported)

VendorProductVersions
SAML-Toolkits ruby-saml < 1.12.4>= 1.13.0, < 1.18.0

Weakness: CWE-347, CWE-436 · Vector: 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

References