CVE Explorer
CVE-2026-57236
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
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
0
Affected products and versions
1 source assertion{"product":"nokogiri","vendor":"sparklemotion","versions":[{"status":"affected","version":"< 1.19.4"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:9716339aeb703e68fbf9da982fb06f3eba53faa4827fbc35b8bb6834939e7efa · sha256:1e8a787857d82f5e… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":1.7,"baseSeverity":"LOW","privilegesRequired":"NONE","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"LOW","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE"},"metric_type":"cvssV4_0"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:9716339aeb703e68fbf9da982fb06f3eba53faa4827fbc35b8bb6834939e7efa · sha256:1e8a787857d82f5e… · /containers/cna/metrics/0/cvssV4_0
CWE assertions
1 source assertion{"cweId":"CWE-416","description":"CWE-416: Use After Free","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:9716339aeb703e68fbf9da982fb06f3eba53faa4827fbc35b8bb6834939e7efa · sha256:1e8a787857d82f5e… · /containers/cna/problemTypes/0/descriptions/0
Source references
1 source assertion{"name":"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-5v8h-3h3q-446p","tags":["x_refsource_CONFIRM"],"url":"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-5v8h-3h3q-446p"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:9716339aeb703e68fbf9da982fb06f3eba53faa4827fbc35b8bb6834939e7efa · sha256:1e8a787857d82f5e… · /containers/cna/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.