CVE-2026-126064 Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Node#[]=` or `#lang=`
- Exploited in the wild
- Not known
- Fix
- Available
What is CVE-2026-126064?
CVE-2026-126064 is a low-severity vulnerability in sparklemotion nokogiri, published on 10 Nov 2026.
Official description
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.
Weakness: CWE-416
Which versions are affected by CVE-2026-126064?
1 open source package ship an affected version, including nokogiri.
| Package | Affected | Fixed in |
|---|---|---|
nokogiri RubyGems | All versions | 1.19.5 |
How do I fix CVE-2026-126064?
Upgrade nokogiri to 1.19.5 or later.
Is CVE-2026-126064 being exploited?
There is no known exploitation of CVE-2026-126064 in the wild and no public exploit code.
Sources
Also known as AZL-113338, DEBIAN-CVE-2026-126064, GHSA-3w22-6jfg-527w, UBUNTU-CVE-2026-126064.