---
title: "CVE-2026-57236"
canonical_url: "https://pkgseek.com/security/CVE-2026-57236"
locale: "en"
source: "pkgseek"
entity_type: "cve"
severity: "high"
---

# 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 CRuby (libxml2) implementation only; JRuby is not affected. This vulnerability is fixed in 1.19.4.

CVE-2026-57236 is rated HIGH (8.2), with 1 indexed affected package builds across 1 distributions.

- **Severity / Score**: HIGH (8.2)
- **Affected builds**: 1
- **Affected distros**: 1
- **Distros with fixed_in**: None recorded in sample

## Affected Packages

| Distribution | Release | Package | Version | Fixed In |
| --- | --- | --- | --- | --- |
| Debian | trixie | ruby-nokogiri | 1.18.2+dfsg-1+b1 | — |
