# CVE-2026-57234: Nokogiri XXE and SSRF via NONET bypass in JRuby XML Schema parsing

Source: https://junglewise.ai/threats/cve-2026-57234-nokogiri-xxe-and-ssrf-via-nonet-bypass-in-jruby-xml-schema  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-25. Updated: 2026-06-25  
License: CC BY 4.0 with a link back

CVE-2026-57234 · Severity: low · CVSS 3.1 · Published 2026-06-25

Nokogiri is a popular library used by Ruby developers to process and read XML and HTML data. In certain configurations using JRuby, the library fails to block unauthorized network requests when processing XML schemas, even when security protections are enabled. This could allow an attacker to trick the system into fetching internal data or connecting to unintended external servers, potentially leading to data exposure.

Technologies: [nokogiri (RubyGems)](https://junglewise.ai/threats/technologies/nokogiri). Vendors: [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2026-57234 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-57234 being exploited in the wild.

**How severe is CVE-2026-57234?** Low severity, with a CVSS score of 3.1, published 25 June 2026.

**Which products and versions are affected?** nokogiri (RubyGems) ECOSYSTEM:introduced=0,fixed=1.19.4.

**Is there a fix for CVE-2026-57234?** Yes. nokogiri (RubyGems): upgrade to 1.19.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-57234 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-57234?** Check whether you run nokogiri (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- nokogiri (RubyGems): upgrade to 1.19.4 or later

  ```sh
  bundle update nokogiri
  ```


## Technical details

A vulnerability exists in Nokogiri's JRuby implementation where the NONET parse option is not correctly enforced for Nokogiri::XML::Schema. While Nokogiri enables NONET by default to prevent network access during parsing, the JRuby implementation used an incomplete denylist for schemes that could be bypassed (e.g., via case-sensitivity issues). This allows a specially crafted XML schema to trigger external resource fetching. The fix in version 1.19.4 replaces the scheme denylist with a strict allowlist that only permits local file resources when NONET is enabled. CRuby implementations are unaffected as they rely on libxml2's native I/O layer protections.

## Affected products

- sparklemotion Nokogiri < 1.19.4

## Identifiers

- CVE-2026-57234
- GHSA-8678-w3jw-xfc2

## Timeline

- 2026-06-18: advisory: GitHub security advisory published
- 2026-06-25: disclosed: CVE published to NVD
- 2026-06-25: patched: Fixed in version 1.19.4

## References

- [https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-8678-w3jw-xfc2](https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-8678-w3jw-xfc2)

## Related threats

- [Nokogiri use-after-free in attribute replacement](https://junglewise.ai/threats/cve-2026-126064-nokogiri-is-an-open-source-xml-and-html-library-for-the-ruby)
- [Nokogiri HTML5 serializer mutation XSS via noscript and attributes](https://junglewise.ai/threats/cve-2026-126063-nokogiri-is-an-open-source-xml-and-html-library-for-the-ruby)
- [JRuby: NONET is bypassed for external DTDs and entities when the systemId uses a short-form IPv4 host](https://junglewise.ai/threats/cve-2026-126062-nokogiri-is-an-open-source-xml-and-html-library-for-the-ruby)
- [Nokogiri unchecked return value in canonicalize method](https://junglewise.ai/threats/nokogiri-unchecked-return-value-in-canonicalize-method-3863de91)
- [Nokogiri XSLT transform memory leak](https://junglewise.ai/threats/nokogiri-xslt-transform-memory-leak-0441ddf7)
