GHSA-gc95-3vw8-vg43: High severity maven/org.docx4j:docx4j-core vulnerability

Published Aug 17, 2026
·
Updated

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) for responsibly disclosing this issue.

Affected Software

1 affected componentFixes available
maven/org.docx4j:docx4j-core<=11.5.13
11.5.14

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.docx4j:docx4j-core to a version that resolves this vulnerability.

    Fixed in 11.5.14
  2. Compensating control

    Ensure server-side DOCX processing using docx4j is isolated so that a `java.lang.StackOverflowError` from cyclic `w:basedOn` style references cannot crash or degrade shared worker threads (e.g., process uploads in disposable/isolated worker processes and restart cleanly).

  3. Operational

    Deploy a change to prevent unbounded recursion in docx4j’s style/property resolution code path (e.g., add cycle detection when recursively walking the OpenXML `w:basedOn` style inheritance chain in/around `PropertyResolver.fillPPrStack`).

Event History

Aug 17, 2026
Advisory Published
via GitHub·09:55 PM
Data Sourced
via GitHub·09:55 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of GHSA-gc95-3vw8-vg43?

The severity of GHSA-gc95-3vw8-vg43 is classified as high with a score of 7.5.

2

How do I fix GHSA-gc95-3vw8-vg43?

To fix GHSA-gc95-3vw8-vg43, update to the latest version of the docx4j library that contains the patch.

3

What is the risk associated with GHSA-gc95-3vw8-vg43?

The risk associated with GHSA-gc95-3vw8-vg43 is the possibility of a denial of service due to unbounded recursion caused by cyclic style inheritance in WordprocessingML documents.

4

Which software is affected by GHSA-gc95-3vw8-vg43?

GHSA-gc95-3vw8-vg43 affects the Maven package org.docx4j:docx4j-core.

5

How does GHSA-gc95-3vw8-vg43 impact document processing?

GHSA-gc95-3vw8-vg43 can lead to application crashes during document processing if a cyclic style chain is present.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203