CVE-2026-53752: docx4j Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-gc95-3vw8-vg43
CVSS 7.5
CWE-770 CWE-674
Published
Advisory Summary

CVE-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.

CVE-2026-53752 at a Glance

CVE Identifier CVE-2026-53752
GHSA Identifier GHSA-gc95-3vw8-vg43
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product docx4j
Package Ecosystem Maven
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (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.

org.docx4j:docx4j-core fixed: 11.5.14
<dependency>
    <groupId>org.docx4j</groupId>
    <artifactId>docx4j-core</artifactId>
    <version>11.5.14</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=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

### Summary docx4j's `PropertyResolver` and several adjacent helpers recursively walk the OpenXML style inheritance chain (`w:basedOn`) without cycle detection. A 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. These 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. ### Details Representative snippet: `PropertyResolver.fillPPrStack` ```java private void fillPPrStack(String styleId, Stack<PPr> pPrStack) { Style style = liveStyles.get(styleId); ... // if it is based on, recurse if (style.getBasedOn() == null) { log.debug("Style " + styleId + " is a root style."); } else if (style.getBasedOn().getVal() != null) { String basedOnStyleName = style.getBasedOn().getVal(); fillPPrStack(basedOnStyleName, pPrStack); // ← unbounded recursion ... ``` ### Impact This is a denial of service against a server-side application that processes untrusted docx files via docx4j. An 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). The 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. Severity: 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. ### Credits Thanks to Koh You Liang ([@Isopach](https://github.com/Isopach)) for responsibly disclosing this issue.

CVE-2026-53752 Affected docx4j Versions

1 component(s)
Fixed Versions:
11.5.14
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?
CVE-2026-53752 is a security vulnerability in docx4j involving Stack Overflow via Cyclic `w:basedOn` Style Chain leads to Denial of Service under CWE-770: Allocation of Resources Without Limits or Throttling.
Which docx4j versions are affected?
Affected versions include releases prior to 11.5.14 across affected packages: org.docx4j:docx4j-core.
What version fixes CVE-2026-53752?
Upgrading to 11.5.14 (or the latest patched release for your respective branch) resolves the vulnerability.
Is docx4j-core affected?
Yes, org.docx4j:docx4j-core is affected in releases prior to 11.5.14. Upgrade your dependency to 11.5.14 or later.
What is the CVSS score of CVE-2026-53752?
CVE-2026-53752 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-53752?
CVE-2026-53752 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (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.).
How can I check Maven dependencies for CVE-2026-53752?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.docx4j'. 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-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
  }
}