Nokogiri does not check the return value from xmlC14NExecute
Published: February 18, 2026
SECURITY IDENTIFIERS
- CVE: CVE-2026-79772 (NVD)
- GHSA: GHSA-wx95-c6cv-8532
GEM
SEVERITY
CVSS v3.x: 5.3 (Medium)
UNAFFECTED VERSIONS
< 1.5.1
PATCHED VERSIONS
>= 1.19.1
DESCRIPTION
Summary
Nokogiri'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.
JRuby is not affected, as the Java implementation correctly raises
RuntimeError on canonicalization failure.
Credit
This vulnerability was responsibly reported by HackerOne researcher d4d.
RELATED
- https://nvd.nist.gov/vuln/detail/CVE-2026-79772
- https://rubygems.org/gems/nokogiri/versions/1.19.1
- https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md#v1191--2026-02-16
- https://www.vulncheck.com/advisories/nokogiri-before-unchecked-return-value-canonicalize
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-wx95-c6cv-8532
- https://github.com/advisories/GHSA-wx95-c6cv-8532
