File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ gem : nokogiri
3+ ghsa : wx95-c6cv-8532
4+ url : https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-wx95-c6cv-8532
5+ title : Nokogiri does not check the return value from xmlC14NExecute
6+ date : 2026-02-18
7+ description : |
8+ ## Summary
9+
10+ Nokogiri's CRuby extension fails to check the return value from
11+ `xmlC14NExecute` in the method `Nokogiri::XML::Document#canonicalize`
12+ and `Nokogiri::XML::Node#canonicalize`. When canonicalization fails,
13+ an empty string is returned instead of raising an exception. This
14+ incorrect return value may allow downstream libraries to accept
15+ invalid or incomplete canonicalized XML, which has been demonstrated
16+ to enable signature validation bypass in SAML libraries.
17+
18+ JRuby is not affected, as the Java implementation correctly
19+ raises `RuntimeError` on canonicalization failure.
20+
21+ ## Mitigation
22+
23+ Upgrade to Nokogiri `>= 1.19.1`.
24+
25+ ## Severity
26+
27+ The maintainers have assessed this as **Medium** severity. Nokogiri
28+ itself is a parsing library without a clear security boundary
29+ related to canonicalization, so the direct impact is that a method
30+ returns incorrect data on invalid input. However, this behavior
31+ was exploited in practice to bypass SAML signature validation
32+ in downstream libraries (see References).
33+
34+ ## Credit
35+
36+ This vulnerability was responsibly reported by HackerOne
37+ researcher `d4d`.
38+ cvss_v3 : 5.3
39+ unaffected_versions :
40+ - " < 1.5.1"
41+ patched_versions :
42+ - " >= 1.19.1"
43+ related :
44+ url :
45+ - https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-wx95-c6cv-8532
46+ - https://github.com/advisories/GHSA-wx95-c6cv-8532
You can’t perform that action at this time.
0 commit comments