GHSA-jrmc-qg6p-94fp — parser
Fix: veraPDF/veraPDF-parser#703GHSA-jrmc-qg6p-94fp is a CWE-1325 vulnerability in org.verapdf:parser. A fix is available for org.verapdf:parser — see the affected versions and patch details below.
veraPDF Parser DoS via PostScript CMap Streams
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-jrmc-qg6p-94fp.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
org.verapdf:parser☕org.verapdf:parserReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Summary
Description
A PostScript-interpreter-driven Denial of Service (CWE-1325) vulnerability in veraPDF allows a remote attacker to exhaust validator memory or CPU by submitting a PDF whose Type 0 font /Encoding (or any /ToUnicode) is a CMap stream containing attacker-supplied PostScript. veraPDF reuses its CMap parser as a general PostScript interpreter and exposes the unguarded array N allocation operator and the for control operator with no zero-increment guard. This affects all current versions of veraPDF-parser.
Details
The vulnerability resides in veraPDF-parser. CMap streams referenced as a Type 0 font's /Encoding (or any font's /ToUnicode) are parsed by CMapParser (veraPDF-parser/src/main/java/org/verapdf/pd/font/cmap/CMapParser.java), which extends PSParser. Tokens that are not the small CMap-specific keyword set (begincodespacerange, bfchar, cidchar, ...) fall through to PSObject.execute (veraPDF-parser/src/main/java/org/verapdf/parser/postscript/PSObject.java), which dispatches generic PostScript operators implemented in PSOperator (veraPDF-parser/src/main/java/org/verapdf/parser/postscript/PSOperator.java).
Two operators in that interpreter take their bound from the PDF and apply no validation:
arrayat PSOperator.java:536-547 pops the top number from the operand stack and immediately callsCOSArray.construct(arraySize), then loopsarraySizetimes appendingCOSObject.getEmpty().COSArray.construct(int)callsnew ArrayList<>(arraySize)(COSArray.java:102), so the underlyingObject[]is allocated up-front. Passing2147483647(Integer.MAX_VALUE) requests a 16 GB backing array on a 64-bit JVM.forat PSOperator.java:571-592 readsinitial,increment, andlimitfrom the stack and loopsfor (long i = initial; i <= limit; i += increment). Becauseincrementis unchecked,0 0 1 { } forproduces an infinite-CPU spin (and progressively a heap exhaustion as each iteration pushesionto the operand stack).
CMapFactory.getCMap only catches IOException and PostScriptException; it does not catch OutOfMemoryError or wall-clock budget, so the failure propagates out of font model construction and aborts the validation worker.
A single payload byte sequence, the unframed PostScript 2147483647 array, is sufficient. No begincmap/endcmap framing is required because the operator runs before the parser ever reaches the CMap structure.
Impact
This impacts all current releases of the veraPDF-parser. Successful exploitation requires only that the target validate an attacker-supplied PDF; a single Type 0 font with a malicious /Encoding (or any /ToUnicode) stream is sufficient.
Proposed Patch
Cap array allocation and forbid zero increments in for.
As a defensive measure, also wrap CMapFactory.getCMap to enforce a wall-clock and operand-stack-size budget on CMap parsing, and audit the remaining unbounded operators (copy, roll, dict) for similar primitives.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.verapdf:parser | all versions | 1.30.2org.verapdf:parser:1.30.2 |
| ☕Maven | org.verapdf:parser | ≥ 1.31.1&&< 1.31.23 | 1.31.23org.verapdf:parser:1.31.23 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.verapdf:parser, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.verapdf:parser to 1.30.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-jrmc-qg6p-94fp is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-jrmc-qg6p-94fp can be triaged on real exposure rather than presence alone.
Tailored to GHSA-jrmc-qg6p-94fp. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-jrmc-qg6p-94fp in your dependencies?
O3 Security finds GHSA-jrmc-qg6p-94fp across Maven dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.