Vulnerabilities in pkg:maven/org.docx4j/docx4j-core
PACKAGECVE-2026-53752 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting docx4j libraries in the Maven ecosystem. The issue involves stack overflow via cyclic `w:basedon` style chain leads to denial of service. Remediation is available by upgrading affected packages to version 11.5.14.
pkg:maven/org.docx4j/docx4j-core
Vulnerability advisories affecting package pkg:maven/org.docx4j/docx4j-core. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-gc95-3vw8-vg43 | CVE-2026-53752 | HIGH | docx4j: Stack Overflow via Cyclic `w:basedOn` Style Chain leads to Denial of Service |
CVE-2026-53752 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-53752
To remediate this vulnerability, upgrade all affected docx4j dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j-core</artifactId>
<version>11.5.14</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.docx4j
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2026-53752, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.docx4j
Analyze the terminal output to locate any version of docx4j in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.5.14), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.docx4j 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-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In docx4j, 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
CVE-2026-53752 Affected docx4j Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.docx4j:docx4j-core
|
Maven |
< 11.5.14
|
11.5.14
|
References
Frequently Asked Questions
What is CVE-2026-53752?
Which docx4j versions are affected?
What version fixes CVE-2026-53752?
Is docx4j-core affected?
What is the CVSS score of CVE-2026-53752?
What CWE is associated with CVE-2026-53752?
How can I check Maven dependencies for CVE-2026-53752?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gc95-3vw8-vg43",
"modified" : "2026-08-17T21:55:49Z",
"published" : "2026-08-17T21:55:49Z",
"aliases" : [ "CVE-2026-53752" ],
"summary" : "docx4j: Stack Overflow via Cyclic `w:basedOn` Style Chain leads to Denial of Service",
"details" : "### Summary\ndocx4j's `PropertyResolver` and several adjacent helpers recursively walk the OpenXML style inheritance chain (`w:basedOn`) without cycle detection. \n\nA WordprocessingML document containing a cyclic style chain (for example, Style A based on B and Style B based on A) causes unbounded recursion and a `java.lang.StackOverflowError` within the property-resolution code path.\n\nThese helpers are used by operations that require effective style resolution, including common conversion and TOC-related paths. As a result, most server-side pipelines that accept a user-supplied docx and process it through docx4j can likely be crashed by a file containing a cyclic style reference.\n\n### Details\n\nRepresentative snippet: `PropertyResolver.fillPPrStack`\n\n```java\nprivate void fillPPrStack(String styleId, Stack<PPr> pPrStack) {\n Style style = liveStyles.get(styleId);\n ...\n // if it is based on, recurse\n if (style.getBasedOn() == null) {\n log.debug(\"Style \" + styleId + \" is a root style.\");\n } else if (style.getBasedOn().getVal() != null) {\n String basedOnStyleName = style.getBasedOn().getVal();\n fillPPrStack(basedOnStyleName, pPrStack); // ← unbounded recursion\n ...\n```\n\n### Impact\nThis is a denial of service against a server-side application that processes untrusted docx files via docx4j. \n\nAn upload causes the processing thread to be terminated with `StackOverflowError` which may crash the worker thread, degrade the thread pool, or evade normal per-request CPU and heap-memory safeguards in containers and serverless functions (because the failure mode is thread-stack exhaustion rather than gradual resource consumption).\n\nThe attack depends on the host application's access controls and requires no user interaction beyond submitting the file. Detection is difficult because the file is a well-formed OOXML package containing ordinary style elements, and passes standard antivirus and content-inspection rules.\n\nSeverity: High for server-side applications that process untrusted DOCX files using docx4j style/property resolution (unless the application catches StackOverflowError, isolates conversion in disposable worker processes, restarts workers cleanly, and the practical impact is only failure of one request). Severity may be Medium where document upload requires authentication, processing is isolated, or the failure is limited to a single request/worker.\n\n### Credits\nThanks to Koh You Liang ([@Isopach](https://github.com/Isopach)) for responsibly disclosing this issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.docx4j:docx4j-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "11.5.14"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 11.5.13"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/plutext/docx4j/security/advisories/GHSA-gc95-3vw8-vg43"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/plutext/docx4j"
}, {
"type" : "WEB",
"url" : "https://github.com/plutext/docx4j/releases/tag/docx4j-11.5.14"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-674", "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-17T21:55:49Z",
"nvd_published_at" : null
}
}