CVE Catalog

CVE-2026-126064

LowCVSS 2.0
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.16%

5th percentile - higher than 5% of all known CVEs

Summary

In Nokogiri (CRuby), replacing an attribute value via Node#[]= or Node#lang= after code has accessed the attribute's child nodes frees native child nodes while their Ruby wrappers remain reachable. Later use of those wrappers can cause an invalid read or process segfault. JRuby is not affected.

Risk Assessment

Ruby applications using Nokogiri to modify XML/HTML attributes may experience process crashes, leading to denial of service.

Recommendation

Update Nokogiri to version 1.19.5 or later.

Other vulnerabilities in Nokogiri

See all
Original NVD description (English source)

Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.5, the CRuby native extension can leave Ruby wrappers pointing to freed memory when Nokogiri::XML::Node#[]= or Nokogiri::XML::Node#lang= replaces an existing attribute value after code has accessed the attribute's child nodes. Replacing the value frees native child nodes while their wrappers remain reachable, and later use of those wrappers can cause an invalid read or process segfault. JRuby is not affected. This issue is fixed in version 1.19.5.

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