{"id":"CVE-2026-54081","aliases":["CVE-2026-54081","GHSA-7c26-995w-6f47"],"related":[],"kind":"vulnerability","state":"published","title":"veraPDF Parser DoS via PostScript Type 1 Font Programs","summary":"veraPDF PDF parser is a PDF parser for veraPDF. Prior to 1.30.2 and 1.31.23, veraPDF-parser contains a denial-of-service vulnerability in veraPDF-parser/src/main/java/org/verapdf/pd/font/type1/Type1FontProgram.java and veraPDF-parser/src/main/java/org/verapdf/parser/postscript/PSOperator.java, where a crafted Type 1 font /FontDescriptor /FontFile program can execute unbounded PostScript array allocation, a zero-increment for loop, or self-recursive toExecute user dictionary lookups and exhaust validator memory, CPU, or stack. This issue is fixed in versions 1.30.2 and 1.31.23.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"veraPDF PDF parser is a PDF parser for veraPDF. Prior to 1.30.2 and 1.31.23, veraPDF-parser contains a denial-of-service vulnerability in veraPDF-parser/src/main/java/org/verapdf/pd/font/type1/Type1FontProgram.java and veraPDF-parser/src/main/java/org/verapdf/parser/postscript/PSOperator.java, where a crafted Type 1 font /FontDescriptor /FontFile program can execute unbounded PostScript array allocation, a zero-increment for loop, or self-recursive toExecute user dictionary lookups and exhaust validator memory, CPU, or stack. This issue is fixed in versions 1.30.2 and 1.31.23.","source":"cvelist"},{"lang":"en","text":"## Summary\n\n**Description**\n\nA 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 1 font `/FontFile` is a font program containing attacker-supplied PostScript. veraPDF's Type 1 font program parser dispatches every cleartext token through a hardcoded operator allow-list whose members include the unbounded `array N` allocation operator and the `for` control operator with no zero-increment guard. This affects all current versions of veraPDF-parser.\n\n## Details\n\nThe vulnerability resides in veraPDF-parser. Type 1 font program streams referenced from any Type 1 font's `/FontDescriptor /FontFile` are parsed by `Type1FontProgram` (veraPDF-parser/src/main/java/org/verapdf/pd/font/type1/Type1FontProgram.java), which extends `PSParser`. `parseFont` reads cleartext PostScript tokens until it encounters `eexec` (which switches into the encrypted private dictionary parser) or end-of-stream. Each non-`eexec` token is dispatched via `toExecute`, which gates execution behind a hardcoded allow-list.\n\nThe allow-list explicitly admits both `ARRAY` (Type1FontProgram.java:98) and `FOR` (Type1FontProgram.java:100). When either keyword passes the gate, `operator.execute` delegates straight into the generic `PSOperator` implementation (`org.verapdf.parser.postscript.PSOperator`, methods `array()` at PSOperator.java:536-547 and `opFor()` at PSOperator.java:571-592), which apply no validation:\n\n1. `array N` calls `COSArray.construct(N)` followed by `new ArrayList<>(N)` (COSArray.java:102), so the underlying `Object[]` is allocated up-front. Passing `2147483647` (`Integer.MAX_VALUE`) requests a 16 GB backing array on a 64-bit JVM.\n2. `for` runs `for (long i = initial; i <= limit; i += increment)` with no validation of `increment`. With `increment == 0`, the loop never exits.\n\nIn addition to the two shared primitives, `toExecute` introduces a third primitive specific to this code path: when an unknown operator is encountered, it looks the name up in `userDict` and recursively re-executes the value. There is no visited-set, no recursion-depth cap, and no detection of a cycle. A Type 1 font program that defines a name to itself, such as `/loop { loop } def loop`, recurses indefinitely on the JVM stack and throws `StackOverflowError` after ~16,000 frames.\n\nThe interpreter is reachable on every Type 1 font validation. `GFPDType1Font`'s constructor unconditionally calls `program.parseFont()`.\n\n`Type1FontProgram.parseFont` only catches `PostScriptException` and rewraps it as `IOException`; it does not catch `OutOfMemoryError`, `StackOverflowError`, or wall-clock budget, so any of the three failure modes propagates out of font model construction and aborts the validation worker.\n\nA single payload byte sequence is sufficient. The conventional `%!PS-AdobeFont-1.0` header line is treated as a comment and skipped; the parser then begins consuming PostScript tokens, the very first `for` invocation enters the infinite loop, and the parser never reaches the `eexec` boundary that would normally end the cleartext section.\n\n## Impact\n\nThis impacts all current releases of the veraPDF-parser. Successful exploitation requires only that the target validate an attacker-supplied PDF; a single Type 1 font with a malicious `/FontFile` stream is sufficient.","format":"markdown","source":"ghsa"},{"lang":"es","text":"El analizador de PDF de veraPDF es un analizador de PDF para veraPDF. Antes de las versiones 1.30.2 y 1.31.23, veraPDF-parser contiene una vulnerabilidad de denegación de servicio en veraPDF-parser/src/main/java/org/verapdf/pd/font/type1/Type1FontProgram.java y veraPDF-parser/src/main/java/org/verapdf/parser/postscript/PSOperator.java, donde un programa de fuente Type 1 /FontDescriptor /FontFile manipulado puede ejecutar una asignación ilimitada de arrays PostScript, un bucle ’for’ con incremento cero o búsquedas de diccionario de usuario ’toExecute’ autorrecursivas y agotar la memoria, CPU o pila del validador. Este problema está corregido en las versiones 1.30.2 y 1.31.23.","source":"nvd"}],"published":"2026-07-29T15:18:52.076Z","modified":"2026-10-23T23:10:00.157Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","score":6.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","rating":"MEDIUM"}],"cwes":["CWE-1325"],"affected":[{"ranges":[{"version":"< 1.30.2","status":"affected"},{"version":">= 1.31.1, < 1.31.23","status":"affected"}],"vendor":"veraPDF","product":"veraPDF-parser","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.30.2"}],"ecosystem":"Maven","package":"org.verapdf:parser","purl":"pkg:maven/org.verapdf/parser","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.31.1","status":"affected","fixed":"1.31.23"}],"ecosystem":"Maven","package":"org.verapdf:parser","purl":"pkg:maven/org.verapdf/parser","source":"ghsa"}],"references":[{"url":"https://github.com/veraPDF/veraPDF-parser/security/advisories/GHSA-7c26-995w-6f47","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/veraPDF/veraPDF-parser/pull/703","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/veraPDF/veraPDF-parser/commit/73d6ec002b98ce1f3f68640442f8e5d5613c80ce","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/veraPDF/veraPDF-parser/commit/cb3538607a549d63504299be1088c85ae48605f4","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/veraPDF/veraPDF-parser","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-07-30T13:54:10.778Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-54081","url":"https://www.cve.org/CVERecord?id=CVE-2026-54081","licence":"CVE Terms of Use","modified":"2026-07-30T15:19:44.182Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7c26-995w-6f47","url":"https://github.com/advisories/GHSA-7c26-995w-6f47","licence":"CC-BY-4.0","modified":"2026-07-29T15:41:42.955Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-54081","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54081","licence":"Public domain","modified":"2026-10-23T23:10:00.157Z"}],"updatedAt":"2026-11-25T22:59:30.451Z","epss":{"score":0.00302,"percentile":0.24655,"date":"2026-12-01T12:00:22.000Z"}}