CVE-2026-57436 json
Nokogiri: Possible Use-After-Free when setting `Document#root=` to an invalid node type
published 2026-06-19 4 mo ago modified 2026-10-25 14 d ago also GHSA-wjv4-x9w8-wm3h , EUVD-2026-39427
- cvss
- 5.3
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 34%
- public exploits
- 0
- none known
Summary
Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri::XML::Document#root= validated only that the new root was a Nokogiri::XML::Node, allowing a DTD node to be set as the document root. The result is a heap use-after-free during garbage collection or finalization, leading to an invalid memory read or potentially a segfault. This vulnerability is fixed in 1.19.4.
Patch / fix
- rubygems nokogiri 1.19.4
- nokogiri nokogiri 1.19.4
- ruby-nokogiri Debian 14 1.19.4+dfsg-1
debian advisories DEBIAN-CVE-2026-57436
- ruby-nokogiri Alpine 3.24 1.19.4-r0
alpine advisories ALPINE-CVE-2026-57436
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- rubygem-nokogiri Azure Linux 3.0 1.19.4-1
azure linux advisories AZL-91077
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-57436 updated cvss 3.7
nokogiri: rubygem-nokogiri: Nokogiri: Denial of Service via heap use-after-free
-
Red Hat 3scale API Management Platform 2 3scale-amp21/zync, 3scale-amp22/zync, 3scale-amp21/system, 3scale-amp22/system, 3scale-amp21/backend, 3scale-amp22/backend, +9 more Red Hat Satellite 6 rubygem-nokogiriaffected: workaround, no fix available “Fix deferred”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- total
- Assessed
- 4 mo ago
Exploit prediction
0.40% chance of exploitation in the next 30 days, higher than 34% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 1.7 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U |
| CNA | 4.0 | 1.7 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U/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 |
| NVD | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | nokogiri | <1.19.4 |
1.19.4 |
Affected products
- sparklemotion nokogiri
Classification
- Weakness
-
- CWE-416 Use After Free
References
-
github.com
/sparklemotion/nokogiri/security/advisories/GHSA-wjv4-x9w8-wm3h
web, mitigation, vendor-advisory
-
github.com
/sparklemotion/nokogiri
package
Sources
- CVE List CVE-2026-57436
- GitHub Advisory GHSA-wjv4-x9w8-wm3h
- NVD CVE-2026-57436
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.