Vulnerabilities in pkg:maven/org.verapdf/parser

PACKAGE
Advisory Identifier: GHSA-7c26-995w-6f47
Advisory Summary

CVE-2026-54081 is a MODERATE denial of service vulnerability (CWE-1325: Improperly Controlled Sequential Memory Allocation) affecting Parser libraries in the Maven ecosystem. The issue involves verapdf parser dos via postscript type 1 font programs. Remediation is available by upgrading affected packages to version 1.30.2, 1.31.23.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.verapdf/parser

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.verapdf/parser. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-7c26-995w-6f47 CVE-2026-54081 MODERATE veraPDF Parser DoS via PostScript Type 1 Font Programs
GHSA-jrmc-qg6p-94fp CVE-2026-54080 MODERATE veraPDF Parser DoS via PostScript CMap Streams

CVE-2026-54081 at a Glance

CVE Identifier CVE-2026-54081
GHSA Identifier GHSA-7c26-995w-6f47
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-1325: Improperly Controlled Sequential Memory Allocation
Affected Product Parser
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2026-54081

To remediate this vulnerability, upgrade all affected Parser 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.verapdf:parser fixed: 1.30.2
<dependency>
    <groupId>org.verapdf</groupId>
    <artifactId>parser</artifactId>
    <version>1.30.2</version>
</dependency>
org.verapdf:parser fixed: 1.31.23
<dependency>
    <groupId>org.verapdf</groupId>
    <artifactId>parser</artifactId>
    <version>1.31.23</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.verapdf

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-54081, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.verapdf

Analyze the terminal output to locate any version of Parser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.30.2), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.verapdf 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-1325: Improperly Controlled Sequential Memory Allocation, where the product manages a group of objects or resources and performs a separate memory allocation for each object, but it does not properly limit the total amount of memory that is consumed by all of the combined objects. In Parser, 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 **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 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. ## Details The 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. The 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: 1. `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. 2. `for` runs `for (long i = initial; i <= limit; i += increment)` with no validation of `increment`. With `increment == 0`, the loop never exits. In 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. The interpreter is reachable on every Type 1 font validation. `GFPDType1Font`'s constructor unconditionally calls `program.parseFont()`. `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. A 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. ## 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 1 font with a malicious `/FontFile` stream is sufficient.

CVE-2026-54081 Affected Parser Versions

2 component(s)
Fixed Versions:
1.30.21.31.23
Product / Package Ecosystem Affected Versions Fixed Version
org.verapdf:parser
Maven
< 1.30.2
1.30.2
org.verapdf:parser
Maven
≥ 1.31.1
< 1.31.23
1.31.23

References

Frequently Asked Questions

What is CVE-2026-54081?
CVE-2026-54081 is a security vulnerability in Parser involving veraPDF Parser DoS via PostScript Type 1 Font Programs under CWE-1325: Improperly Controlled Sequential Memory Allocation.
Which Parser versions are affected?
Affected versions include releases prior to 1.30.2, 1.31.23 across affected packages: org.verapdf:parser.
What version fixes CVE-2026-54081?
Upgrading to 1.30.2, 1.31.23 (or the latest patched release for your respective branch) resolves the vulnerability.
Is parser affected?
Yes, org.verapdf:parser is affected in releases prior to 1.30.2, 1.31.23. Upgrade your dependency to 1.30.2, 1.31.23 or later.
What CWE is associated with CVE-2026-54081?
CVE-2026-54081 is classified under CWE-1325: Improperly Controlled Sequential Memory Allocation (The product manages a group of objects or resources and performs a separate memory allocation for each object, but it does not properly limit the total amount of memory that is consumed by all of the combined objects.).
How can I check Maven dependencies for CVE-2026-54081?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.verapdf'. 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-7c26-995w-6f47",
  "modified" : "2026-07-29T15:19:04Z",
  "published" : "2026-07-29T15:19:04Z",
  "aliases" : [ "CVE-2026-54081" ],
  "summary" : "veraPDF Parser DoS via PostScript Type 1 Font Programs",
  "details" : "## 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.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.verapdf:parser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.30.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.30.1"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.verapdf:parser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.31.1"
      }, {
        "fixed" : "1.31.23"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.31.22"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/veraPDF/veraPDF-parser/security/advisories/GHSA-7c26-995w-6f47"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/veraPDF/veraPDF-parser/pull/703"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/veraPDF/veraPDF-parser/commit/73d6ec002b98ce1f3f68640442f8e5d5613c80ce"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/veraPDF/veraPDF-parser/commit/cb3538607a549d63504299be1088c85ae48605f4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/veraPDF/veraPDF-parser"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1325" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-29T15:19:04Z",
    "nvd_published_at" : null
  }
}