CVE-2026-57437
published low CVSS 4.0 · 1.7Nokogiri: Possible Use-After-Free when directly using `NokogirI::XML::XPathContext` beyond document lifetime
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| sparklemotion | — | nokogiri< 1.19.4 | Affected | Not stated | GitHub_M |
| Alpine Linux | edge | ruby-nokogiri | Fixed | 1.19.4-r0 | Package fix record |
| Alpine Linux | v3.24 | ruby-nokogiri | Fixed | 1.19.4-r0 | Package fix record |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 1.7 / 10
- Severity
- low
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| sparklemotion | nokogiri | < 1.19.4 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-416 CWE-416: Use After Free
References
1Provider assertions
2GitHub_M · cna
Nokogiri: Possible Use-After-Free when directly using `NokogirI::XML::XPathContext` beyond document lifetime
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 213f41f980025bd05acd5221258ead19b63c204acf904863936605099e9c5323
- Ingested
- 23 Sep 2026, 09:21:43 UTC
- Source record
- Official CVE record