Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Node#[]=` or `#lang=`
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| sparklemotionnokogiri | — | Not listed |
| rubygemsnokogiri |
< 1.19.5→ 1.19.5 |
1.19.5 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- BellSoft Alpaquita BELL-CVE-2026-126064 ruby-nokogiri Fix available
- Debian DEBIAN-CVE-2026-126064 ruby-nokogiri Fix available
- Ubuntu UBUNTU-CVE-2026-126064 ruby-nokogiri No fixed version in this record
Original description The description as published by the 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.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- patch github.com
- patch github.com
- REDHAT Red Hat
- web github.com
- web github.com
- web github.com