REDHAT-BUG-2492952: Medium severity Nokogiri vulnerability

Published Jun 25, 2026
·
Updated

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

1 affected component
Nokogiri<1.19.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Nokogiri (CRuby/libxml2) to a version that resolves this vulnerability.

    Fixed in 1.19.4

Event History

Jun 25, 2026
Data Sourced
via Red Hat·03:03 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2492952?

The severity of REDHAT-BUG-2492952 is rated as medium (4).

2

What does REDHAT-BUG-2492952 affect?

REDHAT-BUG-2492952 affects the Nokogiri library for Ruby, specifically versions prior to 1.19.4.

3

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.

4

How do I fix REDHAT-BUG-2492952?

To fix REDHAT-BUG-2492952, upgrade Nokogiri to version 1.19.4 or later.

5

When was REDHAT-BUG-2492952 published?

REDHAT-BUG-2492952 was published on June 25, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203