CVE-2026-57437 json
Nokogiri: Possible Use-After-Free when directly using `NokogirI::XML::XPathContext` beyond document lifetime
published 2026-06-19 4 mo ago modified 2026-10-25 14 d ago also GHSA-p67v-3w7g-wjg7 , EUVD-2026-39428
- 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::XPathContext did not keep its source document alive for garbage collection. If an XPathContext outlived its document and the document was collected, evaluating an XPath expression could read invalid memory and potentially segfault. This is only reachable when application code constructs an XPathContext directly and lets the document become unreachable while continuing to use the context. The normal Document#xpath, #css, and related search methods are not affected, and it is not triggerable by malicious document input. 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-57437
- ruby-nokogiri Alpine 3.24 1.19.4-r0
alpine advisories ALPINE-CVE-2026-57437
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-91071
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-57437 updated cvss 4.7
nokogiri: Nokogiri: Denial of Service due to improper XPathContext garbage collection
-
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
- no
- Technical impact
- partial
- 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/U:Clear |
| 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:Clear |
| 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-p67v-3w7g-wjg7
web, mitigation, vendor-advisory
-
github.com
/sparklemotion/nokogiri
package
Sources
- CVE List CVE-2026-57437
- GitHub Advisory GHSA-p67v-3w7g-wjg7
- NVD CVE-2026-57437
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.