CVE-2026-57236

LOW CVSS 4.0: 1.7 EPSS 0.43%
Updated Oct 26, 2026
Nokogiri
Parameter Value
CVSS 1.7 (LOW)
Affected Versions before 1.19.4
Fixed In 1.19.4
Type CWE-416 (Use After Free)
Vendor Nokogiri
Public PoC No

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.

Attack Parameters

Attack Vector
Network
Can be exploited remotely
Attack Complexity
Low
Easy to exploit
Attack Requirements
Present
Additional conditions required
Privileges Required
None
No privileges needed
User Interaction
None
No user interaction needed

Impact Assessment

Confidentiality
None
No data leak
Integrity
None
No data modification
Availability
Low
Partial disruption

CVSS Vector v4.0

Weakness Type (CWE)

Vulnerable Products 1

Configuration From (including) Up to (excluding)
Nokogiri Nokogiri
cpe:2.3:a:nokogiri:nokogiri:*:*:*:*:*:ruby:*:*
— 1.19.4