CVE-2026-126064
LOW 2.0CVSS 4.0Nokogiri: Use-After-Free in Nokogiri when replacing an attribute value
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.
- Published
- 10 Nov 2026
- Last modified
- 12 Nov 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Awaiting Analysis
- Weakness
- CWE-416
- Also known as
- GHSA-3w22-6jfg-527w
- Sources
- NVDJSONOSV GHSA-3w22-6jfg-527wJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | LOW 2.0 | 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 |
| OSV | GitHub | CVSS 4.0 | 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 |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | RubyGems | nokogiri | < 1.19.5 | 1.19.5 |
References
- https://github.com/sparklemotion/nokogiri/commit/b15b518db9fd15fd6b046f73d1439c282e5cc425 · WEB
- https://github.com/sparklemotion/nokogiri/commit/feaed3c8c9bd9d81d064d4ca09b16044cd705d6f · WEB
- https://github.com/sparklemotion/nokogiri/pull/3752 · WEB
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5 · WEB
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-3w22-6jfg-527w · WEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/GHSA-3w22-6jfg-527w.yml · WEB
- https://github.com/sparklemotion/nokogiri · PACKAGE
History
- 25 Nov 2026 21:23 UTC · NVD: first stored (published 10 Nov 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 10 Nov 2026)