GHSA-9cv2-cfxc-v4v2
ADVISORY - githubSummary
Summary
Nokogiri contains a bug when calling certain methods on allocated-but-uninitialized native wrapper classes that inherit from Nokogiri::XML::Node. This caused a NULL pointer dereference that could crash the process.
Nokogiri 1.19.4 checks for missing native data pointers and raises a RuntimeError.
JRuby is not affected.
Severity
The Nokogiri maintainers have evaluated this as low severity. This is only triggered by a programming error. It requires application code to call .allocate directly on a native-backed class and then invoke methods on the resulting uninitialized object. It cannot be triggered by untrusted input or through normal use of the public API.
Mitigation
Upgrade to Nokogiri 1.19.4 or later.
Avoid calling .allocate directly on Nokogiri native-backed classes. Use the documented constructors and factory methods instead.
Credit
This issue was responsibly reported by Zheng Yu from depthfirst.com.
Common Weakness Enumeration (CWE)
NULL Pointer Dereference
GitHub
-
CVSS SCORE
1.7lowChainguard
CGA-5x4f-fpcq-mc9m
-
minimos
MINI-5386-c8wp-2w9m
-
minimos
MINI-5wc6-gq6c-prj8
-
minimos
MINI-5wj5-8v5w-v5qp
-
minimos
MINI-9vxm-4293-6qgg
-
minimos
MINI-p6q5-25jf-685h
-
minimos
MINI-wrwh-6vv8-hc2j
-
minimos
MINI-xgrj-mq9m-m772
-