CVE Catalog

GHSA-wjv4-x9w8-wm3h

Low
Published: Translated: NVD NIST

Summary

A vulnerability in the Nokogiri library allows a DTD node to be set as the document root, leading to a heap use-after-free during garbage collection or finalization. This results in an invalid memory read or potentially a segfault.

Risk Assessment

An attacker could exploit this vulnerability to cause application crashes (segfault) or potentially remote code execution if the application processes untrusted XML documents.

Recommendation

It is recommended to immediately update the Nokogiri library to a version that includes a fix for this vulnerability (e.g., version 1.16.7 or later).

Original NVD description (English source)

### Summary `Nokogiri::XML::Document#root=` validated only that the new root was a `Nokogiri::XML::Node`, allowing a DTD node to be set as the document root. The result is a heap use-after-free during garbage collection or finalization, leading to an invalid memory read or potentially a segfault.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS