---
id: "CVE-2026-126062"
page: "https://infrastack.ai/live/CVE-2026-126062"
kind: "vulnerability"
aliases: ["CVE-2026-126062", "GHSA-v995-44v6-5fqm"]
title: "JRuby: NONET is bypassed for external DTDs and entities when the systemId uses a short-form IPv4 host"
severity: "low"
cvss: 3.7
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "nokogiri", "fixed": ["1.19.5"], "affected": "< 1.19.5", "ecosystem": "rubygems"}]
ecosystems: ["rubygems"]
tags: ["cwe-611", "cwe-918", "jruby", "nokogiri", "package", "ruby"]
not_affected_if: ["default-config", "mri-ruby", "trusted-input-only"]
published_at: "2026-11-10T20:19:10+00:00"
first_seen_at: "2026-11-10T20:46:04+00:00"
updated_at: "2026-11-10T20:57:46+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126062", "first_seen_at": "2026-11-10T20:46:04+00:00"}, {"source": "ghsa", "url": "https://github.com/advisories/GHSA-v995-44v6-5fqm", "first_seen_at": "2026-11-10T20:56:29+00:00"}]
exploit_sources: []
---

# JRuby: NONET is bypassed for external DTDs and entities when the systemId uses a short-form IPv4 host

Link for people: https://infrastack.ai/live/CVE-2026-126062 (this .md is for agents)

On JRuby, Nokogiri's NONET parse option fails to block external DTDs and entities whose system identifier uses a short-form IPv4 host or an absolute path. An application that parses untrusted XML with DTDLOAD, DTDVALID or NOENT can be made to send network requests, enabling SSRF.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- rubygems:nokogiri affected < 1.19.5 fixed 1.19.5

## How to check

- Check the Nokogiri version in the Gemfile.lock for `nokogiri` and confirm whether it is below `1.19.5`.
- Confirm the application runs on JRuby.
- Search the code for parse calls that enable `DTDLOAD`, `DTDVALID` or `NOENT` on untrusted input.

## Fix

- Nokogiri: upgrade to `1.19.5` or later.
- Alternatively, do not enable `DTDLOAD`, `DTDVALID` or `NOENT` for untrusted input.

## Timeline

- 2026-11-10T20:46:04+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-126062
- 2026-11-10T20:56:29+00:00 ghsa https://github.com/advisories/GHSA-v995-44v6-5fqm

## Documents

- [advisory] Vendor advisory: github.com https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-v995-44v6-5fqm
- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/sparklemotion/nokogiri/security-advisories/GHSA-v995-44v6-5fqm
- [fix] Patch: github.com https://github.com/sparklemotion/nokogiri/commit/97f41b65f4ee0cac859b87f0b26d2648c4806cb8
- [fix] Patch: github.com https://github.com/sparklemotion/nokogiri/commit/e448ca2827a9198644610fb730259e12baacdeac
- [fix] Release notes: github.com https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5
- [fix] Patch: github.com https://github.com/sparklemotion/nokogiri/pull/3752

## From the sources

### Summary

On JRuby, the `NONET` parse option did not block an external DTD or entity whose system identifier used a short-form IPv4 host, such as `http://127.1/` or `http://169.254.43518/`, or was an absolute path such as `/x.dtd` in a document parsed from a network URL. An application that parses untrusted XML with `DTDLOAD`, `DTDVALID` or `NOENT` could be made to send network requests, potentially enabling SSRF.

Nokogiri 1.19.5 applies the `XML::Schema` check from [GHSA-8678-w3jw-xfc2](https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-8678-w3jw-xfc2): with `NONET` set, only local resources are loaded.

Only JRuby is affected. Default parse options are not affected.

### Severity

The Nokogiri maintainers have evaluated this as low severity.

### Mitigation

Upgrade to Nokogiri 1.19.5 or later, or do not enable `DTDLOAD`, `DTDVALID` or `NOENT` for untrusted input.

### Credit

This issue was responsibly reported by @arpitjain099.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
