Lookup for vulnerable packages by Package URL.

Purlpkg:gem/nokogiri@1.19.1
Typegem
Namespace
Namenokogiri
Version1.19.1
Qualifiers
Subpath
Is_vulnerablefalse
Next_non_vulnerable_versionnull
Latest_non_vulnerable_versionnull
Affected_by_vulnerabilities
Fixing_vulnerabilities
0
url VCID-jfh3-1sgm-7ug2
vulnerability_id VCID-jfh3-1sgm-7ug2
summary
Nokogiri does not check the return value from xmlC14NExecute
## 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.

## Mitigation

Upgrade to Nokogiri `>= 1.19.1`.

## Severity

The 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).

## Credit

This vulnerability was responsibly reported by HackerOne researcher `d4d`.
references
0
reference_url https://github.com/sparklemotion/nokogiri
reference_id
reference_type
scores
0
value 5.3
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
url https://github.com/sparklemotion/nokogiri
1
reference_url https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-wx95-c6cv-8532
reference_id
reference_type
scores
0
value 5.3
scoring_system cvssv3
scoring_elements
1
value 5.3
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
2
value MODERATE
scoring_system cvssv3.1_qr
scoring_elements
3
value MODERATE
scoring_system generic_textual
scoring_elements
url https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-wx95-c6cv-8532
2
reference_url https://github.com/advisories/GHSA-wx95-c6cv-8532
reference_id GHSA-wx95-c6cv-8532
reference_type
scores
0
value MODERATE
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-wx95-c6cv-8532
fixed_packages
0
url pkg:gem/nokogiri@1.19.1
purl pkg:gem/nokogiri@1.19.1
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:gem/nokogiri@1.19.1
aliases GHSA-wx95-c6cv-8532
risk_score 3.1
exploitability 0.5
weighted_severity 6.2
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-jfh3-1sgm-7ug2
Risk_scorenull
Resource_urlhttp://public2.vulnerablecode.io/packages/pkg:gem/nokogiri@1.19.1