|
| 1 | +--- |
| 2 | +gem: ruby-saml |
| 3 | +cve: 2025-66568 |
| 4 | +ghsa: x4h9-gwv3-r4m4 |
| 5 | +url: https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-x4h9-gwv3-r4m4 |
| 6 | +title: Ruby-saml allows a Libxml2 Canonicalization error to bypass |
| 7 | + Digest/Signature validation |
| 8 | +date: 2025-12-08 |
| 9 | +description: | |
| 10 | + ### Summary |
| 11 | +
|
| 12 | + Ruby-saml up to and including 1.12.4, there is an authentication |
| 13 | + bypass vulnerability because of an issue at libxml2 canonicalization |
| 14 | + process used by Nokogiri for document transformation. That allows |
| 15 | + an attacker to be able to execute a Signature Wrapping attack. |
| 16 | + The vulnerability does not affect the version 1.18.0. |
| 17 | +
|
| 18 | + ### Details |
| 19 | +
|
| 20 | + When libxml2’s canonicalization is invoked on an invalid XML input, |
| 21 | + it may return an empty string rather than a canonicalized node. |
| 22 | + ruby-saml then proceeds to compute the DigestValue over this empty |
| 23 | + string, treating it as if canonicalization succeeded. |
| 24 | +
|
| 25 | + ### Impact |
| 26 | +
|
| 27 | + 1. Digest bypass: By crafting input that causes canonicalization to |
| 28 | + yield an empty string, the attacker can manipulate validation to |
| 29 | + pass incorrectly. |
| 30 | +
|
| 31 | + 2. Signature replay on empty canonical form: If an empty string has |
| 32 | + been signed once (e.g., in a prior interaction or via a |
| 33 | + misconfigured flow), that signature can potentially be replayed |
| 34 | + to bypass authentication. |
| 35 | +cvss_v3: 9.1 |
| 36 | +cvss_v4: 9.3 |
| 37 | +patched_versions: |
| 38 | + - ">= 1.18.0" |
| 39 | +related: |
| 40 | + url: |
| 41 | + - https://nvd.nist.gov/vuln/detail/CVE-2025-66568 |
| 42 | + - https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-x4h9-gwv3-r4m4 |
| 43 | + - https://github.com/SAML-Toolkits/ruby-saml/commit/acac9e9cc0b9a507882c614f25d41f8b47be349a |
| 44 | + - https://github.com/advisories/GHSA-x4h9-gwv3-r4m4 |
0 commit comments