CVE-2025-66568

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

Published Dec 9, 2025 CVSS 4.0 · 9.3 Critical EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-x4h9-gwv3-r4m4 Ruby-saml allows a Libxml2 Canonicalization error to bypass Digest/Signature validation
History
Type Values Removed Values Added
First Time appeared Onelogin
Onelogin ruby-saml
CPEs cpe:2.3:a:onelogin:ruby-saml:*:*:*:*:*:*:*:*
Vendors & Products Onelogin
Onelogin ruby-saml
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Saml-toolkits
Saml-toolkits ruby-saml
Vendors & Products Saml-toolkits
Saml-toolkits ruby-saml
Type Values Removed Values Added
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.
Title ruby-saml Libxml2 Canonicalization errors can bypass Digest/Signature validation
Weaknesses CWE-347
References
Metrics cvssV4_0

{'score': 9.3, '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Dec 9, 2025, 4:02 PM
Reserved
Dec 4, 2025, 4:17 PM
Status
Analyzed
Published
Dec 9, 2025, 4:18 PM
Modified
Oct 14, 2026, 9:10 PM