PoC Monitor
← All CVEs
CVE-2026-57236published 25 Jun 2026 14:29 UTCData: JSON · API

Nokogiri

Nokogiri: Possible Use-After-Free when `Nokogiri::XML::Document#encoding=` raises an exception

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.

First public PoC None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.2high · scored by NVD · CWE-416
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

sparklemotion nokogiri
  • < 1.19.4

Fixed in 1.19.4

Mitigation

Upgrade nokogiri to 1.19.4 or later.

References

Timeline

Days relative to CVE publication
-2t=0+2+4+6+8CVE published25 Jun 2026 · t = 0

No public PoC found yet; not in CISA KEV.

PoC repositories

Found on GitHub.

No PoC repositories found yet.