{"id":"CVE-2025-66568","aliases":["CVE-2025-66568","GHSA-x4h9-gwv3-r4m4"],"related":[],"kind":"vulnerability","state":"published","title":"ruby-saml Libxml2 Canonicalization errors can bypass Digest/Signature validation","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\nRuby-saml up to and including 1.12.4, there is an authentication bypass vulnerability because of an issue at libxml2 canonicalization process used by Nokogiri for document transformation. That allows an attacker to be able to execute a Signature Wrapping attack. The vulnerability does not affect the version 1.18.0.\n\n### Details\nWhen 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.\n\n### Impact\n1. Digest bypass: By crafting input that causes canonicalization to yield an empty string, the attacker can manipulate validation to pass incorrectly.\n\n2. Signature replay on empty canonical form: If an empty string has been signed once (e.g., in a prior interaction or via a misconfigured flow), that signature can potentially be replayed to bypass authentication.","format":"markdown","source":"ghsa"},{"lang":"es","text":"La biblioteca ruby-saml implementa el lado del cliente de una autorización SAML. Las versiones hasta la 1.12.4 inclusive son vulnerables a la omisión de autenticación a través del proceso de canonicalización de libxml2 utilizado por Nokogiri para la transformación de documentos, lo que permite a un atacante ejecutar un ataque de Signature Wrapping. Cuando se invoca la canonicalización de libxml2 en una entrada XML no válida, puede devolver una cadena vacía en lugar de un nodo canonicalizado. ruby-saml procede entonces a calcular el DigestValue sobre esta cadena vacía, tratándolo como si la canonicalización hubiera tenido éxito. Este problema está corregido en la versión 1.18.0.","source":"nvd"}],"published":"2025-12-08T22:03:19.000Z","modified":"2026-10-14T21:10:00.183Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":9.3,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-347"],"affected":[{"ranges":[{"version":"< 1.18.0","status":"affected"}],"vendor":"SAML-Toolkits","product":"ruby-saml","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.18.0"}],"ecosystem":"RubyGems","package":"ruby-saml","purl":"pkg:gem/ruby-saml","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.18.0"}],"vendor":"onelogin","product":"ruby-saml","cpe":"cpe:2.3:a:onelogin:ruby-saml:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/SAML-Toolkits/ruby-saml/security/advisories/GHSA-x4h9-gwv3-r4m4","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/SAML-Toolkits/ruby-saml/commit/acac9e9cc0b9a507882c614f25d41f8b47be349a","tags":["broken-link","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66568","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/SAML-Toolkits/ruby-saml","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/ruby-saml/CVE-2025-66568.yml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2025-12-09T14:16:24.122Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-66568","url":"https://www.cve.org/CVERecord?id=CVE-2025-66568","licence":"CVE Terms of Use","modified":"2025-12-09T16:02:52.564Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x4h9-gwv3-r4m4","url":"https://github.com/advisories/GHSA-x4h9-gwv3-r4m4","licence":"CC-BY-4.0","modified":"2025-12-12T22:21:53.601Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-66568","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66568","licence":"Public domain","modified":"2026-10-14T21:10:00.183Z"}],"updatedAt":"2026-11-25T22:59:08.540Z","epss":{"score":0.00265,"percentile":0.19734,"date":"2026-12-01T12:00:22.000Z"}}