{"id":"CVE-2026-79772","aliases":["CVE-2026-79772","GHSA-wx95-c6cv-8532"],"related":[],"kind":"vulnerability","state":"published","title":"Nokogiri before 1.19.1 Unchecked Return Value canonicalize","summary":"Nokogiri versions before 1.19.1 fail to check the return value from xmlC14NExecute in the canonicalize method, returning an empty string on failure instead of raising an exception. Attackers can exploit this to bypass signature validation in downstream SAML libraries by providing invalid canonicalized XML that is incorrectly accepted as valid.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Nokogiri versions before 1.19.1 fail to check the return value from xmlC14NExecute in the canonicalize method, returning an empty string on failure instead of raising an exception. Attackers can exploit this to bypass signature validation in downstream SAML libraries by providing invalid canonicalized XML that is incorrectly accepted as valid.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nNokogiri's CRuby extension fails to check the return value from `xmlC14NExecute` in the method `Nokogiri::XML::Document#canonicalize` and `Nokogiri::XML::Node#canonicalize`. When canonicalization fails, an empty string is returned instead of raising an exception. This incorrect return value may allow downstream libraries to accept invalid or incomplete canonicalized XML, which has been demonstrated to enable signature validation bypass in SAML libraries.\n\nJRuby is not affected, as the Java implementation correctly raises `RuntimeError` on canonicalization failure.\n\n## Mitigation\n\nUpgrade to Nokogiri `>= 1.19.1`.\n\n## Severity\n\nThe maintainers have assessed this as **Medium** severity. Nokogiri itself is a parsing library without a clear security boundary related to canonicalization, so the direct impact is that a method returns incorrect data on invalid input. However, this behavior was exploited in practice to bypass SAML signature validation in downstream libraries (see References).\n\n## Credit\n\nThis vulnerability was responsibly reported by HackerOne researcher `d4d`.","format":"markdown","source":"ghsa"}],"published":"2026-02-18T21:57:38.000Z","modified":"2026-09-10T03:50:36.054Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","score":6.9,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-252"],"affected":[{"ranges":[{"type":"semver","introduced":"1.5.1","fixed":"1.19.1","status":"affected"},{"type":"semver","version":"1.19.1","status":"unaffected"}],"vendor":"sparklemotion","product":"nokogiri","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.5.1","status":"affected","fixed":"1.19.1"}],"ecosystem":"RubyGems","package":"nokogiri","purl":"pkg:gem/nokogiri","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.5.1","fixed":"1.19.1"}],"vendor":"nokogiri","product":"nokogiri","cpe":"cpe:2.3:a:nokogiri:nokogiri:*:*:*:*:*:ruby:*:*","source":"nvd"}],"references":[{"url":"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-wx95-c6cv-8532","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/nokogiri-before-unchecked-return-value-canonicalize","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-79772","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/sparklemotion/nokogiri","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-08-28T22:24:35.826Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-79772","url":"https://www.cve.org/CVERecord?id=CVE-2026-79772","licence":"CVE Terms of Use","modified":"2026-08-28T22:24:47.141Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-wx95-c6cv-8532","url":"https://github.com/advisories/GHSA-wx95-c6cv-8532","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:36.054Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-79772","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-79772","licence":"Public domain","modified":"2026-09-01T14:54:24.567Z"}],"updatedAt":"2026-11-25T22:59:35.176Z","epss":{"score":0.00246,"percentile":0.17001,"date":"2026-12-01T12:00:22.000Z"}}