CVE-2026-126064: Use-After-Free in Nokogiri when replacing an attribute value
Affects nokogiriSource GCVE Database
Not known to be exploited · CVSS 2.0 Low : upgrade to 1.19.5 when convenient.
Data as of 10 Nov 2026, 21:07 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 4.0 | 2.0 |
|---|
- Patch
- Available – fixed in 1.19.5
CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 10 Nov 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 10 Nov 2026.
What to do
Upgrade nokogiri to 1.19.5.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| RubyGemsnokogiri | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade to Nokogiri version 1.19.5 or later, where this issue is fixed. As a temporary workaround, avoid accessing attribute child nodes directly via Attr#children or similar methods before replacing the same attribute's value using Node#[]= or Node#lang=.
Description
Nokogiri versions prior to 1.19.5 contain a use-after-free vulnerability in the CRuby native extension when replacing the value of an existing XML attribute via Nokogiri::XML::Node#[]= or Nokogiri::XML::Node#lang=. This occurs if the attribute's child nodes were accessed before replacement, potentially causing invalid memory reads or segfaults. The issue is fixed in Nokogiri 1.19.5. JRuby is not affected. The maintainers rate this vulnerability as low severity due to the unusual usage pattern required to trigger it.
References
- github.com/sparklemotion/nokogiri/security/advisories/GHSA-3w22-6jfg-527w (opens in a new tab)
- github.com/sparklemotion/nokogiri/pull/3752 (opens in a new tab)
- github.com/sparklemotion/nokogiri/commit/b15b518db9fd15fd6b046f73d1439c282e5cc425 (opens in a new tab)
- github.com/sparklemotion/nokogiri/commit/feaed3c8c9bd9d81d064d4ca09b16044cd705d6f (opens in a new tab)
- github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/GHSA-3w22-6jfg-527w.yml (opens in a new tab)
- github.com/sparklemotion/nokogiri (opens in a new tab)
- github.com/sparklemotion/nokogiri/releases/tag/v1.19.5 (opens in a new tab)