Home/Research/Post

GHSA-cvx8-9ff6-54xq: PGPainless: Unbounded Compressed Packet Descent in inline-detach and MessageInspector leads to Denial of Service (DoS)

  • Severity: HIGH
  • CVE: CVE-2026-76088
  • Ecosystems: maven, maven
  • Packages: org.pgpainless:pgpainless-core, org.pgpainless:pgpainless-core

### Summary
An architectural security boundary bypass in inline-detach and MessageInspector allows remote, unauthenticated attackers to force unbounded recursive decompression routines. By supplying a specially crafted OpenPGP message containing deeply nested compressed packet structures, an attacker can completely bypass the library’s built-in DoS protections (MAX_LAYER_DEPTH = 16), leading to resource exhaustion, thread blocking, and potential Out-of-Memory (OOM) application crashes.

### Details
The pg-painless core processing pipeline implements a defensive threshold constraint to prevent decompression bomb sequences (Zip Bombs) and arbitrary resource consumption:

Enforcement Location: pgpainless-main/pgpainless-core/src/main/kotlin/org/pgpainless/decryption_verification/MessageMetadata.kt

Threshold Constant: MAX_LAYER_DEPTH = 16

However, a code architecture review revealed two specific packet-walking implementations that unpack and step through PGPCompressedData packets manually, entirely failing to track or increment a layer depth index counter against the static compliance limits:

In InlineDetachImpl.kt (Line ~78-93): The logic loops over data packets via compressedData.dataStream. Because it processes the incoming data block-by-block without leveraging or passing constraints down to the guarded OpenPgpMessageInputStream tracking mechanism, it accepts infinite nesting.

In MessageInspector.kt (Line ~95): The inspector utility descends recursively down nested co…

Source: GitHub Security Advisories · 2026-11-19