CVE-2026-126064
What it is
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.
At a glance
- Exploitability
- Can be exploited locally on the machine with a low-privilege account. Limited direct impact.
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: not scored yet.
- Severity: 2.0 LOW (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Weakness
- CWE-416 · Use after free
- Record status
- Received
Attack profile CVSS 4.0 · 2.0
- Attack vector
- Local
- Complexity
- High
- Attack requirements
- Present
- Privileges needed
- Low
- User interaction
- None
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
Raw 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
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2026-126064.md and follow it. Check whether this project is affected by CVE-2026-126064. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/sparklemotion/nokogiri/commit/b15b518db9fd15fd6b046f73d1439c282e5cc425
- https://github.com/sparklemotion/nokogiri/commit/feaed3c8c9bd9d81d064d4ca09b16044cd705d6f
- https://github.com/sparklemotion/nokogiri/pull/3752
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-3w22-6jfg-527w
References
- https://github.com/sparklemotion/nokogiri/commit/b15b518db9fd15fd6b046f73d1439c282e5cc425
- https://github.com/sparklemotion/nokogiri/commit/feaed3c8c9bd9d81d064d4ca09b16044cd705d6f
- https://github.com/sparklemotion/nokogiri/pull/3752
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-3w22-6jfg-527w