CVE-2026-57236: nokogiri Use After Free
Vulnerability summary
CVE-2026-57236 is a high (CVSS 8.2) Use After Free vulnerability in nokogiri. EPSS estimates a 0.43% chance of exploitation in the next 30 days, higher than 35.5% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 4Timeline
- 25-06-2026PublishedVulnerability first disclosed.
- 25-06-2026Last modifiedVulnerability information updated.
Description
Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, calling Document#encoding= with an invalid encoding (e.g., a non-string, or a string containing a null byte) raises an exception, but only after freeing the document's current encoding string without replacing it. The document is left referencing freed memory, so the next call to Document#encoding reads invalid memory, which can cause a segfault or leak freed bytes into a Ruby String. Affects the CRuby (libxml2) implementation only; JRuby is not affected. This vulnerability is fixed in 1.19.4.
CVSS metrics
7 scores · 5 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated6.3MediumCVSS: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:UDiffers
- OSV · RubygemsEcosystem advisory · calculated6.3MediumCVSS: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:UDiffers
- NVDNIST1.7LowCVSS: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
- OSV · UbuntuEcosystem advisory · calculated8.2HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
- OSV · DebianEcosystem advisory · calculated8.2HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
EPSS trend
Probability
0.43%
Chance of exploitation in the next 30 days
Percentile
36%
Versus all other CVEs
30-day change
+0.09 pp
From 0.34% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Debian1 product
- ruby-nokogiriAll versions (No fix recorded) | < 1.19.4+dfsg-1
Nokogiri1 product
- nokogiri< 1.19.4
RubyGems1 product
- nokogiri< 1.19.4
Sparklemotion1 product
- nokogiri< 1.19.4
Ubuntu1 product
- ruby-nokogiriAll versions (No fix recorded)
5 vendors · 5 products
References
6 links- github.com/sparklemotion/nokogiri/security/advisories/GHSA-5v8h-3h3q-446pX Refsource CONFIRMREPORTWEBMitigationVendor Advisory