Nokogiri
Nokogiri before 1.19.4 Invalid Memory Read via initialize_copy_with_args
Nokogiri versions before 1.19.4 contain a possible invalid (out-of-bounds) memory read in the protected internal Node#initialize_copy_with_args helper behind Node#dup and #clone, which unwrapped its source argument as an xmlNode without a type check. If application code calls this protected method with a non-Node argument (e.g., a Namespace), it reads an xmlNs out of bounds, crashing the process. This is only triggerable by a programming error and cannot be triggered by untrusted input or normal use of the public API. Only CRuby is affected. Version 1.19.4 adds a type check and raises TypeError.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 1.19.4
Fixed in 1.19.4
Mitigation
Upgrade nokogiri to 1.19.4 or later.
References
- Vendor advisory github.com/sparklemotion/nokogiri/security/adv…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.