CVE-2026-79771: Nokogiri XSLT transform has a memory leak
Summary Nokogiri's Nokogiri::XSLT::Stylesheet#transform leaks a small heap allocation when passed a Ruby string parameter containing a null byte. For applications that pass attacker-controlled input through XSLT.transform parameters, this may be a vector for a denial of service attack against long-running processes. Mitigation Upgrade to Nokogiri = 1.19.3.
Published May 6, 2026 · Updated Sep 2, 2026
Affected packages
nokogiri
- Ecosystem
- RubyGems
- Affected
- < 1.19.3
- Fixed in
- 1.19.3
- Check
bundle info nokogiri
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
Nokogiri's Nokogiri::XSLT::Stylesheet#transform leaks a small heap allocation when passed a Ruby string parameter containing a null byte.
For applications that pass attacker-controlled input through XSLT.transform parameters, this may be a vector for a denial of service attack against long-running processes.
Mitigation
Upgrade to Nokogiri >= 1.19.3.
Users may also be able to mitigate this issue without upgrading by validating untrusted transform parameters before passing them to Nokogiri::XSLT::Stylesheet#transform.
Severity
The Nokogiri maintainers have evaluated this as Moderate Severity, CVSS 5.3.
Each leaked allocation is approximately 24–32 bytes, so meaningful memory growth requires sustained attacker-controlled traffic at high call rates. The bug does not cause memory corruption, information disclosure, or any change in the behavior of the transform itself, and the string-handling exception is raised as expected.
Applications that do not pass raw attacker-controlled bytes to XSLT parameters are unlikely to be affected in practice.
Resources
Credit
This vulnerability was responsibly reported by @Captainjack-kor.
Credited to Captainjack-kor, flavorjones.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More RubyGems vulnerabilities
All RubyGems entriesCVE-2026-126062
JRuby: NONET is bypassed for external DTDs and entities when the systemId uses a short-form IPv4 host
low3.7Nov 10, 2026CVE-2026-126063
Nokogiri: Mutation XSS through `noscript` content in Nokogiri's HTML5 serializer
low2.3Nov 10, 2026CVE-2026-126064
Nokogiri: Use-After-Free in Nokogiri when replacing an attribute value
low2.0Nov 10, 2026GHSA-5prr-v3j2-97mh
Nokogiri: Possible Out-of-Bounds Read in `Nokogiri::XML::NodeSet#[]`
medium6.3Jun 19, 2026GHSA-5v8h-3h3q-446p
Nokogiri: Possible Use-After-Free when `Nokogiri::XML::Document#encoding=` raises an exception
low1.7Jun 19, 2026GHSA-8678-w3jw-xfc2
Nokogiri: XML::Schema on JRuby allows network requests when NONET is set, bypassing CVE-2020-26247
low2.6Jun 19, 2026
