Vulnerability · Published Dec 9, 2025 · Assigned by GitHub_M

CVE-2025-66568ruby-saml Libxml2 Canonicalization errors can bypass Digest/Signature validation

Critical 9.3

In plain English

A critical-severity security flaw in ruby-saml from SAML-Toolkits. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

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

Official description

The ruby-saml library implements the client side of an SAML authorization. Versions up to and including 1.12.4, are vulnerable to authentication bypass through the libxml2 canonicalization process used by Nokogiri for document transformation, which allows an attacker to execute a Signature Wrapping attack. When libxml2’s canonicalization is invoked on an invalid XML input, it may return an empty string rather than a canonicalized node. ruby-saml then proceeds to compute the DigestValue over this empty string, treating it as if canonicalization succeeded. This issue is fixed in version 1.18.0.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
RubyGemsruby-saml1.18.0GHSA-x4h9-gwv3-r4m4

Affected products (as reported)

VendorProductVersions
SAML-Toolkits ruby-saml < 1.18.0

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