CVE-2026-61586: Copernik xml factory Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-xm28-xvqc-gxxg
CWE-611
Published
Advisory Summary

CVE-2026-61586 is a HIGH remote code execution vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Copernik xml factory libraries in the Maven ecosystem. The issue involves copernik xml factory (stock jdk provider) has improper restriction of xinclude resource resolution. Remediation is available by upgrading affected packages to version 0.1.2.

CVE-2026-61586 at a Glance

CVE Identifier CVE-2026-61586
GHSA Identifier GHSA-xm28-xvqc-gxxg
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Copernik xml factory
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2026-61586

To remediate this vulnerability, upgrade all affected Copernik xml factory dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

eu.copernik:copernik-xml-factory fixed: 0.1.2
<dependency>
    <groupId>eu.copernik</groupId>
    <artifactId>copernik-xml-factory</artifactId>
    <version>0.1.2</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=eu.copernik

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-61586, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=eu.copernik

Analyze the terminal output to locate any version of Copernik xml factory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.2), your application is affected.

Note: The mvn dependency:tree -Dincludes=eu.copernik command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Copernik xml factory, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Copernik XML Factory through `0.1.1`, when running on its stock JDK provider, does not block XInclude resource resolution after an application enables XInclude on a factory returned by `XmlFactories.newDocumentBuilderFactory()` or `XmlFactories.newSAXParserFactory()`, or on an `XMLReader` passed through `XmlFactories.harden()`. The library's documented guarantee that XInclude resolution stays disabled therefore does not hold on that provider. An application that parses untrusted XML in this configuration can be made to resolve `xi:include` references, allowing an attacker to read local files (information disclosure) or, through `http` hrefs, reach internal network endpoints (SSRF). All of the following conditions must hold for an application to be affected: - it obtains a factory from `XmlFactories.newDocumentBuilderFactory()` or `XmlFactories.newSAXParserFactory()`, or hardens an externally obtained `XMLReader` with `XmlFactories.harden()`; - the stock JDK provider is in effect, that is, Apache Xerces is not on the classpath; - XInclude is enabled, by calling `setXIncludeAware(true)` or the equivalent reader feature; - it parses XML from an untrusted source. The Xerces provider (selected when Xerces is on the classpath) and the Android provider are not affected. Applications are advised to upgrade to `0.1.2`, which fixes the defect. As a workaround add Apache Xerces (`xercesImpl`) to the classpath so the library selects its unaffected Xerces provider. ### Acknowledgements The maintainer thank the following people for finding, reporting, and helping to remediate this issue: - Finders: Ta Duc Thien and Duc Anh Nguyen (Danzation) - Remediation developer: Ta Duc Thien - Tooling: Claude Code (Anthropic), Claude Opus 4.8

CVE-2026-61586 Affected Copernik xml factory Versions

1 component(s)
Fixed Versions:
0.1.2
Product / Package Ecosystem Affected Versions Fixed Version
eu.copernik:copernik-xml-factory
Maven
< 0.1.2
0.1.2

References

Frequently Asked Questions

What is CVE-2026-61586?
CVE-2026-61586 is a security vulnerability in Copernik xml factory involving Copernik XML Factory (stock JDK provider) has Improper restriction of XInclude resource resolution under CWE-611: Improper Restriction of XML External Entity Reference.
Which Copernik xml factory versions are affected?
Affected versions include releases prior to 0.1.2 across affected packages: eu.copernik:copernik-xml-factory.
What version fixes CVE-2026-61586?
Upgrading to 0.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is copernik-xml-factory affected?
Yes, eu.copernik:copernik-xml-factory is affected in releases prior to 0.1.2. Upgrade your dependency to 0.1.2 or later.
What CWE is associated with CVE-2026-61586?
CVE-2026-61586 is classified under CWE-611: Improper Restriction of XML External Entity Reference (The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.).
How can I check Maven dependencies for CVE-2026-61586?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=eu.copernik'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xm28-xvqc-gxxg",
  "modified" : "2026-10-02T18:27:17Z",
  "published" : "2026-10-02T18:27:17Z",
  "aliases" : [ "CVE-2026-61586" ],
  "summary" : "Copernik XML Factory (stock JDK provider) has Improper restriction of XInclude resource resolution",
  "details" : "Copernik XML Factory through `0.1.1`, when running on its stock JDK provider, does not block XInclude resource resolution after an application enables XInclude on a factory returned by `XmlFactories.newDocumentBuilderFactory()` or `XmlFactories.newSAXParserFactory()`, or on an `XMLReader` passed through `XmlFactories.harden()`. The library's documented guarantee that XInclude resolution stays disabled therefore does not hold on that provider.\n\nAn application that parses untrusted XML in this configuration can be made to resolve `xi:include` references, allowing an attacker to read local files (information disclosure) or, through `http` hrefs, reach internal network endpoints (SSRF).\n\nAll of the following conditions must hold for an application to be affected:\n- it obtains a factory from `XmlFactories.newDocumentBuilderFactory()` or `XmlFactories.newSAXParserFactory()`, or hardens an externally obtained `XMLReader` with `XmlFactories.harden()`;\n- the stock JDK provider is in effect, that is, Apache Xerces is not on the classpath;\n- XInclude is enabled, by calling `setXIncludeAware(true)` or the equivalent reader feature;\n- it parses XML from an untrusted source.\n\nThe Xerces provider (selected when Xerces is on the classpath) and the Android provider are not affected.\n\nApplications are advised to upgrade to `0.1.2`, which fixes the defect. As a workaround add Apache Xerces (`xercesImpl`) to the classpath so the library selects its unaffected Xerces provider.\n\n### Acknowledgements\n\nThe maintainer thank the following people for finding, reporting, and helping to remediate this issue:\n\n- Finders: Ta Duc Thien and Duc Anh Nguyen (Danzation)\n- Remediation developer: Ta Duc Thien\n- Tooling: Claude Code (Anthropic), Claude Opus 4.8",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "eu.copernik:copernik-xml-factory"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/copernik-eu/copernik-xml-factory/security/advisories/GHSA-xm28-xvqc-gxxg"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/copernik-eu/copernik-xml-factory/commit/2fa042c44931b0a4ddd585d62b97a8a987efd6c6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/copernik-eu/copernik-xml-factory/commit/e5febc6039ed4b0088245acb80ed7d6d6a7f5537"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/copernik-eu/copernik-xml-factory"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/copernik-eu/copernik-xml-factory/releases/tag/v0.1.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-02T18:27:17Z",
    "nvd_published_at" : null
  }
}