REDHAT-BUG-2492952: Medium severity Nokogiri vulnerability
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Nokogiri (CRuby/libxml2)to a version that resolves this vulnerability.Fixed in 1.19.4
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2492952?
The severity of REDHAT-BUG-2492952 is rated as medium (4).
What does REDHAT-BUG-2492952 affect?
REDHAT-BUG-2492952 affects the Nokogiri library for Ruby, specifically versions prior to 1.19.4.
How does REDHAT-BUG-2492952 impact system security?
REDHAT-BUG-2492952 may lead to crashes or undefined behavior when Document#encoding= is called with an invalid value.
How do I fix REDHAT-BUG-2492952?
To fix REDHAT-BUG-2492952, upgrade Nokogiri to version 1.19.4 or later.
When was REDHAT-BUG-2492952 published?
REDHAT-BUG-2492952 was published on June 25, 2026.