CVE-2026-57436
Description
A flaw was found in Nokogiri, an open-source library used for processing XML and HTML documents. This vulnerability occurs due to insufficient validation when setting the document's root element, allowing a malicious document to trigger a memory error. This can lead to a heap use-after-free, potentially causing the application to crash and resulting in a Denial of Service (DoS).
Statement
This is a flaw in Nokogiri, a Ruby library for XML and HTML processing, that can result in a denial of service. The vulnerability stems from insufficient validation when setting the document root, allowing a malicious XML document to trigger a heap use-after-free. This could lead to application crashes and impact the availability of services that process untrusted XML or HTML content using Nokogiri. This is only triggered by a programming error.
Red Hat ships Nokogiri as a dependency in several products including Red Hat 3scale API Management Platform, Red Hat Satellite, and Red Hat Enterprise Linux buildroot packages. All affected product versions ship Nokogiri prior to the 1.19.4 fix.
This memory-safety issue affects only the CRuby implementation (libxml2). The JRuby implementation was not affected; the same input validation was added there for behavioral parity.
Mitigation
To mitigate this issue, applications that use Nokogiri to process untrusted XML or HTML documents should implement robust input validation and operate within a sandboxed environment. Restricting the application's ability to process arbitrary external content can reduce the risk of triggering the heap use-after-free vulnerability and prevent a denial of service.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 3.7 | 5.3 | N/A |
| Attack Vector | Network | Network | N/A |
| Attack Complexity | High | Low | N/A |
| Privileges Required | None | None | N/A |
| User Interaction | None | None | N/A |
| Scope | Unchanged | Unchanged | N/A |
| Confidentiality | None | None | N/A |
| Integrity Impact | None | None | N/A |
| Availability Impact | Low | Low | N/A |
Vector
Red Hat: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
NVD: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Understanding the Weakness (CWE)
Other
Technical Impact: Varies by Context
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.