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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| RubyGems | ruby-saml | 1.18.0 | GHSA-x4h9-gwv3-r4m4 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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