LOWCVSS v4 2.0Vulnerability

CVE-2026-126064

### Summary Nokogiri's CRuby native extension could leave a Ruby wrapper pointing to freed memory when replacing the value of an existing XML attribute via `Nokogiri::XML::Node#[]=` or `Nokogiri::XML::Node#lang=`. If Ruby code had already accessed the attribute's child nodes, replacing the value could free those native child nodes while their wrappers remained reachable. Using one of those child nodes afterwards could cause an invalid read and a possible segfault. This is the same class of issue as [GHSA-phwj-rprq-35pp](https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-phwj-rprq-35pp), which was fixed for `Attr#value=` in Nokogiri 1.19.4. Nokogiri 1.19.5 preserves all already-wrapped attribute child nodes before replacing the attribute value. JRuby is not affected. ### Severity The Nokogiri maintainers have evaluated this as low severity. Reaching it requires an unusual API-usage pattern that does not arise during normal use. The application must directly access an attribute's child nodes and then replace that same attribute's value via `Node#[]=` or `Node#lang=`. Nokogiri 1.19.5 makes this pattern safe with no change to the public API. ### Mitigation Upgrade to Nokogiri 1.19.5 or later. As a workaround, avoid accessing attribute child nodes directly via `Attr#children` or similar before replacing the same attribute's value. ### Credit This issue was responsibly reported by zx (@manus-pi).

Properties

Severity
low
Summary
Nokogiri: Use-After-Free in Nokogiri when replacing an attribute value
Nvd fetched at
2026-11-10T23:33:48.924589+00:00
Cvss severity
LOW
Cvss score
2
Retrieved at
2026-11-10T23:34:27+00:00
Ghsa published
2026-11-10T20:51:19Z
Source url
https://github.com/advisories/GHSA-3w22-6jfg-527w
Ghsa updated
2026-11-10T20:51:29Z
Ghsa id
GHSA-3w22-6jfg-527w
Last source
GitHub Advisory Database
Score
2
Cvss version
4.0
Cve id
CVE-2026-126064
Cvss vector
CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
First seen by Signal
2026-11-10T23:31:41+00:00
Is ghsa only
false
Vector
CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Published at
2026-11-10T21:19:24.147
Last modified
2026-11-10T21:19:24.147

Related Entities (3)

AFFECTS (1)

→[Software]rubygems/nokogiri

HAS_WEAKNESS (1)

→[Weakness]Use After Free

VULNERABLE_TO (1)

←[Software]rubygems/nokogiri

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-126064 (CVSS v4 2) — Ninja Signal Threat Intelligence | Ninja Signal