CVE-2026-57236

NameCVE-2026-57236
DescriptionNokogiri 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
Debian Bugs1140769

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
ruby-nokogiri (PTS)bullseye1.11.1+dfsg-2vulnerable
bullseye (security)1.11.1+dfsg-2+deb11u1vulnerable
bookworm1.13.10+dfsg-2vulnerable
trixie1.18.2+dfsg-1vulnerable
forky1.19.1+dfsg-1vulnerable
sid1.19.3+dfsg-1vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
ruby-nokogirisource(unstable)(unfixed)1140769

Notes

https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-5v8h-3h3q-446p

Search for package or bug name: Reporting problems