CVE-2026-61586: 
Java vulnerability analysis and mitigation

Overview

CVE-2026-61586 is an improper restriction of XInclude resource resolution vulnerability in Copernik XML Factory, a Java library designed to provide secure-by-default JAXP factory creation. Versions prior to 0.1.2 of the eu.copernik:copernik-xml-factory Maven package fail to block XInclude resource resolution when using the stock JDK provider, breaking the library's documented security guarantee. The vulnerability was originally published on June 26, 2026, and added to the GitHub Advisory Database on October 2, 2026. It carries a CVSS v4.0 base score of 8.2 (High) (Github Advisory).

Technical details

The root cause is classified as CWE-611 (Improper Restriction of XML External Entity Reference). The stock JDK's XInclude processor does not honor ACCESS_EXTERNAL_DTD or ACCESS_EXTERNAL_SCHEMA attributes when resolving xi:include hrefs; instead, it consults the parser's EntityResolver. Prior to the fix, the library did not install a deny-all EntityResolver on the stock JDK path, meaning that even after hardening via XmlFactories.newDocumentBuilderFactory(), XmlFactories.newSAXParserFactory(), or XmlFactories.harden(), an application that explicitly called setXIncludeAware(true) could still resolve attacker-controlled xi:include references. Exploitation requires four concurrent conditions: use of the affected factory/hardening APIs, the stock JDK provider (Apache Xerces absent from the classpath), explicit XInclude enablement, and parsing of XML from an untrusted source. The fix (commits 2fa042c and e5febc6) installs a non-overridable FallbackDenyResolver floor via HardeningDocumentBuilderFactory and HardeningXMLReader wrappers (Github Advisory, Fix Commit).

Impact

Successful exploitation allows an unauthenticated attacker who can supply untrusted XML to an affected application to read arbitrary local files on the server (information disclosure) or perform Server-Side Request Forgery (SSRF) by crafting xi:include elements with http hrefs that reach internal network endpoints. The confidentiality impact is rated High, while integrity and availability are unaffected. In SSRF scenarios, an attacker could use the vulnerable server as a pivot to probe or interact with internal services not otherwise accessible from the internet (Github Advisory).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the time of publication (Github Advisory). The CVE is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.357% (30th percentile), indicating a low near-term exploitation probability. No threat actor attribution has been reported. The NVD SSVC assessment notes the vulnerability is automatable but exploitation is currently "none" (Github Advisory).

Exploitation steps

  1. Identify a vulnerable target: Locate a Java application that uses eu.copernik:copernik-xml-factory versions prior to 0.1.2, runs without Apache Xerces on the classpath (stock JDK provider), and has explicitly enabled XInclude via setXIncludeAware(true) or equivalent.
  2. Craft a malicious XML payload: Construct an XML document containing an xi:include element referencing a local file (e.g., /etc/passwd) or an internal HTTP endpoint:
<?xml version="1.0"?>
<root xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="file:///etc/passwd" parse="text"/>
</root>
  1. Submit the payload: Deliver the crafted XML to any application endpoint that accepts and parses untrusted XML using the vulnerable factory (e.g., an API accepting XML request bodies, a file upload endpoint, or a document processing service).
  2. Retrieve disclosed data: For local file disclosure, the parsed XML response will contain the contents of the referenced file. For SSRF, replace the href with an internal HTTP URL (e.g., http://169.254.169.254/latest/meta-data/) to probe internal services and observe the response reflected in the application output or error messages (Github Advisory).

Indicators of compromise

  • Network: Outbound HTTP requests from the application server to internal IP ranges (e.g., RFC 1918 addresses, cloud metadata endpoints like 169.254.169.254) initiated by the XML parsing process; unexpected DNS lookups for internal hostnames originating from the Java application.
  • Logs: Application or web server logs showing XML parsing requests that result in unusually large or structured responses containing file content; errors or stack traces referencing xi:include resolution or EntityResolver in application logs.
  • File System: No direct file artifacts are created by this vulnerability, but audit logs may show the Java process reading sensitive files (e.g., /etc/passwd, configuration files, private keys) that it would not normally access.
  • Process: Unusual file read activity by the Java application process on sensitive system files, detectable via OS-level auditing tools (e.g., auditd on Linux with file access rules).

Mitigation and workarounds

The primary remediation is to upgrade eu.copernik:copernik-xml-factory to version 0.1.2, which installs a non-overridable deny-all EntityResolver floor on the stock JDK DOM and SAX paths to block xi:include resolution (Github Advisory, Release v0.1.2). As a workaround, add Apache Xerces (xercesImpl) to the application classpath, which causes the library to select the unaffected Xerces provider instead of the stock JDK provider. Additionally, avoid calling setXIncludeAware(true) on factories obtained from this library unless XInclude processing is strictly required, and never parse XML from untrusted sources with XInclude enabled on an unpatched version.

Community reactions

The vulnerability was discovered and reported by Ta Duc Thien and Duc Anh Nguyen (Danzation), with remediation developed by Ta Duc Thien and tooling assistance from Claude Code (Anthropic). The advisory was published by project maintainer Piotr P. Karwasz (ppkarwasz). No significant broader industry commentary or social media discussion has been identified beyond standard vulnerability database aggregation (Github Advisory).

Additional resources


Source: This report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-61827HIGH8.7
  • Java logoJava
  • io.netty.incubator:netty-incubator-codec-bhttp
NoYesNov 19, 2026
CVE-2026-63202HIGH7.5
  • Java logoJava
  • io.netty.incubator:netty-incubator-codec-bhttp
NoYesNov 19, 2026
CVE-2026-63124HIGH7.5
  • Java logoJava
  • io.netty.incubator:netty-incubator-codec-bhttp
NoYesNov 19, 2026
CVE-2026-69133MEDIUM5.3
  • Java logoJava
  • io.netty.incubator:netty-incubator-codec-ohttp
NoYesNov 19, 2026
CVE-2026-61799MEDIUM5.3
  • Java logoJava
  • io.netty.incubator:netty-incubator-codec-bhttp
NoYesNov 19, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management