Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2026-57236

Опубликовано: 25 июн. 2026
Источник: redhat
CVSS3: 6.5

Описание

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.

A flaw was found in Nokogiri, an XML and HTML library for Ruby. When an attacker provides an invalid encoding to the Document#encoding= function, the library frees the document's current encoding string without replacing it. This leaves the document referencing freed memory, which can lead to a denial of service (DoS) due to a segmentation fault or information disclosure by leaking freed memory into a Ruby String.

Отчет

This flaw has an Important impact as Nokogiri's CRuby implementation in Red Hat products is vulnerable to a use-after-free when processing invalid encoding values. A remote unauthenticated attacker can trigger a segmentation fault causing denial of service, or leak freed memory contents into a Ruby String causing information disclosure, by providing crafted input that causes an invalid encoding to be set on a document.

Меры по смягчению последствий

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Satellite 6satellite:el8/rubygem-nokogiriAffected
Red Hat Satellite 6.16 for RHEL 8rubygem-nokogiriFixedRHSA-2026:5022304.08.2026
Red Hat Satellite 6.16 for RHEL 8rubygem-nokogiriFixedRHSA-2026:5022304.08.2026
Red Hat Satellite 6.16 for RHEL 9rubygem-nokogiriFixedRHSA-2026:5022304.08.2026
Red Hat Satellite 6.16 for RHEL 9rubygem-nokogiriFixedRHSA-2026:5022304.08.2026
Red Hat Satellite 6.17 for RHEL 9rubygem-nokogiriFixedRHSA-2026:5022204.08.2026
Red Hat Satellite 6.17 for RHEL 9rubygem-nokogiriFixedRHSA-2026:5022204.08.2026
Red Hat Satellite 6.18 for RHEL 9rubygem-nokogiriFixedRHSA-2026:5026304.08.2026
Red Hat Satellite 6.18 for RHEL 9rubygem-nokogiriFixedRHSA-2026:5026304.08.2026
Red Hat Satellite 6.19 for RHEL 9rubygem-nokogiriFixedRHSA-2026:5022104.08.2026

Показывать по

Дополнительная информация

Статус:

Moderate
Дефект:
CWE-825
https://bugzilla.redhat.com/show_bug.cgi?id=2492952nokogiri: Nokogiri: Denial of Service or Information Disclosure via invalid encoding handling

6.5 Medium

CVSS3

Связанные уязвимости

CVSS3: 8.2
ubuntu
3 месяца назад

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.

CVSS3: 8.2
nvd
3 месяца назад

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.

CVSS3: 8.2
msrc
3 месяца назад

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

CVSS3: 8.2
debian
3 месяца назад

Nokogiri is an open source XML and HTML library for the Ruby programmi ...

6.5 Medium

CVSS3