ZeroHour

CVE-2026-53752

Stack Overflow DoS in docx4j via Cyclic DOCX Style Inheritance (pre-11.5.14)

CVSS 3.1
7.5 high
EPSS
Published
()
Modified
AI analysis

docx4j, an open-source Java library for processing DOCX, PPTX, and XLSX files, fails to detect cycles in the WordprocessingML w:basedOn style inheritance chain, so PropertyResolver.fillPPrStack and related effective-style resolution paths recurse without bound. An attacker triggers the flaw by supplying a well-formed DOCX containing mutually-based (circular) styles, which throws a StackOverflowError during conversion or table-of-contents processing. Against a service that processes untrusted documents server-side, this can kill worker threads, degrade a thread pool, and cause denial of service; there is no impact on confidentiality or integrity. Any application embedding docx4j versions prior to 11.5.14 that handles attacker-supplied documents is affected, with the practical impact reduced when documents are handled in disposable, isolated workers. No public proof of concept is known and the issue is not in the CISA KEV catalog, so exploitation appears limited, but the trigger is trivial to construct once understood.

What to do: Upgrade docx4j to 11.5.14, which adds cyclic-style tracking and CyclicStylesException handling. If immediate upgrade is not possible, run untrusted-document conversion in disposable, isolated worker threads (or short-lived processes) so a StackOverflowError cannot exhaust the shared thread pool, and monitor logs for StackOverflowError originating in PropertyResolver.fillPPrStack as an indicator of malformed or hostile style chains.

Affected
docx4j (plutext) docx4j< 11.5.14
Estimated exposure
unknown — embedded in many enterprise Java document-processing services; the number of internet-reachable endpoints converting untrusted DOCX files is not… — docx4j is a build-time dependency distributed via Maven rather than a deployed product with install counts or scannable signatures, so only downstream services that accept and convert untrusted documents are exposed and their population…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

docx4j is an open source Java library for creating, editing, and saving OpenXML packages, including DOCX, PPTX, and XLSX files. Prior to 11.5.14, PropertyResolver and adjacent helpers recursively follow the WordprocessingML w:basedOn style inheritance chain without cycle detection. A well-formed DOCX containing mutually based styles causes unbounded recursion in PropertyResolver.fillPPrStack and related effective-style resolution paths, resulting in StackOverflowError. Server-side conversion and table-of-contents processing of an untrusted document can terminate a worker thread, degrade a thread pool, or deny service, although isolation in disposable workers or safe containment of StackOverflowError can reduce the practical effect. The fix adds cyclic-style tracking and CyclicStylesException handling. This issue is fixed in version 11.5.14.

Weakness
CWE-674, CWE-770
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

In the news

No ingested article mentions this CVE yet.