lowVulnerability

GHSA-9cv2-cfxc-v4v2

### 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.

Properties

ghsa_id
GHSA-9cv2-cfxc-v4v2
severity
low
summary
Nokogiri: Null Pointer Dereference calling methods on uninitialized wrapper classes
cve_id
GHSA-9cv2-cfxc-v4v2
is_ghsa_only
true
ghsa_published
2026-06-19T16:36:23Z
source_url
https://github.com/advisories/GHSA-9cv2-cfxc-v4v2
ghsa_updated
2026-06-19T16:36:25Z

Related Entities (4)

VULNERABLE_TO (1)

[Software]rubygems/nokogiri

AFFECTS (1)

[Software]rubygems/nokogiri

HAS_WEAKNESS (1)

[Weakness]NULL Pointer Dereference

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-9cv2-cfxc-v4v2 — Ninja Signal Threat Intelligence | Ninja Signal