---
id: "CVE-2026-61586"
kind: "vulnerability"
aliases: ["CVE-2026-61586"]
title: "Copernik XML Factory: XInclude lets untrusted XML read local files"
severity: "high"
cvss: 8.2
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["copernik-xml-factory", "java", "package", "server-side", "xml"]
not_affected_if: ["android", "trusted-xml-only", "xerces-on-classpath", "xinclude-disabled"]
published_at: "2026-10-30T19:18:27+00:00"
first_seen_at: "2026-10-30T19:25:29+00:00"
updated_at: "2026-10-30T19:25:54+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-61586", "first_seen_at": "2026-10-30T19:25:29+00:00"}]
---

# Copernik XML Factory: XInclude lets untrusted XML read local files

Copernik XML Factory, a Java library for building secure XML parsers, fails to block XInclude resolution on the stock JDK parser after an application enables XInclude. An attacker who supplies XML can read local files or reach internal HTTP endpoints through server-side request forgery.

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

## How to check

- Look for `XmlFactories.newDocumentBuilderFactory()`, `XmlFactories.newSAXParserFactory()` or `XmlFactories.harden()` in the Java code
- Check whether `setXIncludeAware(true)` or an equivalent XInclude feature is enabled on those factories
- Check the dependency tree for the Copernik XML Factory version and confirm Apache Xerces is absent from the classpath

## Fix

- Copernik XML Factory: move to `0.1.2` or later

## Timeline

- 2026-10-30T19:25:29+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-61586

## From the sources

Copernik XML Factory provides secure-by-default JAXP factory creation for Java. Prior to 0.1.2, Copernik XML Factory does not block XInclude resource resolution on the stock JDK provider after an application enables XInclude on a factory returned by `XmlFactories.newDocumentBuilderFactory()` or `XmlFactories.newSAXParserFactory()`, or on an `XMLReader` passed through `XmlFactories.harden()`. An application parsing untrusted XML can resolve attacker-controlled `xi:include` references to disclose local files or, through `http` references, reach internal network endpoints by server-side request forgery. Exploitation requires use of one of those factory/hardening APIs, the stock JDK provider with Apache Xerces absent from the classpath, explicit `setXIncludeAware(true)` or the equivalent reader feature, and XML from an untrusted source. The Xerces provider selected when Xerces is present and the Android provider are unaffected. This issue is fixed in version 0.1.2.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
