cve.bz

CVE-2026-57236 nokogiri nokogiri: Use After Free

1.7 lowEPSS 0.4%Fix available

Low (1.7) in nokogiri nokogiri. EPSS 0.4% estimated probability of exploitation activity in the next 30 days. Fixed in nokogiri 1.19.4.

On this page
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.

Severity

CVSS 4.0

1.7 low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U

CVSS 3.1

8.2 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 38th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-06-25. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-416 Use After Free
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-57236 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-57236?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-57236?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-57236 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
nokogiri:nokogiribefore 1.19.4

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-5v8h-3h3q-446pRubyGemsnokogiri<1.19.41.19.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13ruby-nokogirino fix listedDEBIAN-CVE-2026-57236
Debian14ruby-nokogiri1.19.4+dfsg-1DEBIAN-CVE-2026-57236
Ubuntu16.04:LTS, 18.04:LTS, 24.04:LTS and 6 moreruby-nokogirino fix listedUBUNTU-CVE-2026-57236
Red Hatsatellite:6.16::el8rubygem-katello0:4.14.0.21-1.el8satRHSA-2026:50223
Red Hatsatellite:6.16::el8, satellite_capsule:6.16::el8libsolv, python3-solv, libsolv-debuginfo and 6 more1:0.7.20-7.el8satRHSA-2026:50223
Red Hatsatellite:6.16::el8, satellite_capsule:6.16::el8openvox-agent0:8.24.1-3.el8satRHSA-2026:50223
Red Hatsatellite:6.16::el8, satellite_capsule:6.16::el8openvox-server0:8.14.1-1.el8satRHSA-2026:50223
Red Hatsatellite:6.16::el8, satellite_capsule:6.16::el8python-pillow, python3.11-pillow, python-pillow-debugsource and 1 more0:12.3.0-1.el8pcRHSA-2026:50223
Red Hatsatellite:6.16::el8, satellite_capsule:6.16::el8python-pyjwt, python3.11-pyjwt, python3.11-pyjwt+crypto0:2.13.0-1.el8pcRHSA-2026:50223
Red Hatsatellite:6.16::el8, satellite_capsule:6.16::el8rubygem-faraday0:1.10.6-1.el8satRHSA-2026:50223
Red Hatsatellite:6.16::el8, satellite_capsule:6.16::el8rubygem-nokogiri, rubygem-nokogiri-debuginfo, rubygem-nokogiri-debugsource0:1.15.7-3.el8satRHSA-2026:50223
Red Hatsatellite:6.16::el9rubygem-katello0:4.14.0.21-1.el9satRHSA-2026:50223
Red Hatsatellite:6.16::el9, satellite_capsule:6.16::el9openvox-agent0:8.24.1-3.el9satRHSA-2026:50223
Red Hatsatellite:6.16::el9, satellite_capsule:6.16::el9openvox-server0:8.14.1-1.el9satRHSA-2026:50223
Red Hatsatellite:6.16::el9, satellite_capsule:6.16::el9python-pillow, python3.11-pillow, python-pillow-debugsource and 1 more0:12.3.0-1.el9pcRHSA-2026:50223
22 more for Red Hat in the JSON and on Red Hat's page.
Alpinev3.24ruby-nokogiri1.19.4-r0ALPINE-CVE-2026-57236
Azure Linux3rubygem-nokogiri1.19.4-1AZL-91068
Alpaquitastreamruby-nokogiri1.19.4-r0BELL-CVE-2026-57236

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · Alpine · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

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.

Red Hat's mitigation

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.

ProductPackageStateAdvisory
Red Hat Satellite 6.16 for RHEL 8rubygem-nokogiri-0:1.15.7-3.el8satFixed 2026-08-04RHSA-2026:50223
Red Hat Satellite 6.16 for RHEL 9rubygem-nokogiri-0:1.15.7-3.el9satFixed 2026-08-04RHSA-2026:50223
Red Hat Satellite 6.17 for RHEL 9rubygem-nokogiri-0:1.15.7-3.el9satFixed 2026-08-04RHSA-2026:50222
Red Hat Satellite 6.18 for RHEL 9rubygem-nokogiri-0:1.15.7-3.el9satFixed 2026-08-04RHSA-2026:50263
Red Hat Satellite 6.19 for RHEL 9rubygem-nokogiri-0:1.17.2-3.el9satFixed 2026-08-04RHSA-2026:50221
Red Hat Satellite 6satellite:el8/rubygem-nokogiriAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-57236.

References

Check your stackJSON