HIGH · CVSS 3.1 7.5 EPSS 0.8% · 55th percentile CWE-400

CVE-2026-76088: PGPainless: Unbounded Compressed Packet Descent in inline-detach and MessageInspector leads to Denial of Service (DoS)

Published 2026-11-19 · Updated 2026-11-19 · Also known as GHSA-cvx8-9ff6-54xq

Summary

PGPainless fails to enforce decompression layer depth limits in its inline-detach and MessageInspector modules, allowing for recursive compression bomb attacks. Engineering teams using this library must upgrade to the specified patched versions to prevent denial-of-service via resource exhaustion.

Who is affected

Affected deployments include any application, gateway, or mail client utilizing PGPainless to process untrusted OpenPGP messages or attachments. By supplying deeply nested compressed packet structures, an attacker can bypass built-in security thresholds, leading to thread blocking and Out-of-Memory application crashes.

Exploitability

The vulnerability is rated as High severity with a CVSS 3.1 score of 7.5, indicating it is remotely exploitable without authentication and requires low attack complexity. EPSS data is not yet available, and there is no record of active exploitation in CISA's Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Maven org.pgpainless:pgpainless-core >= 0, < 1.7.8 1.7.8 -
Maven org.pgpainless:pgpainless-core >= 2.0.0, < 2.0.4 2.0.4 -

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityNone
IntegrityNone
AvailabilityHigh

FAQ

What is the primary mechanism of this vulnerability?

The library's internal packet-walking logic in InlineDetachImpl and MessageInspector fails to reference or increment the defined MAX_LAYER_DEPTH constant, effectively ignoring the 16-layer security limit.

Is this a known exploit in the wild?

No, there is currently no documentation indicating that this vulnerability is being actively exploited in the wild, and it is not listed in the CISA Known Exploited Vulnerabilities catalog.

Does this flaw allow remote code execution?

The description specifies the impact as Denial of Service (DoS) resulting from resource exhaustion and potential memory crashes; there is no mention of arbitrary code execution capabilities.

Original advisory description
### 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 compressed packet layouts to ascertain inner content classification markers (e.g., determining encryption states) without referencing or respecting maximum layer depth boundaries. ### PoC The vulnerability can be verified by constructing an inline-signed binary message wrapped recursively inside multiple layers of compression packets: Generate a standard, valid OpenPGP public/private keypair. Sign a plaintext document sample utilizing binary inline-signing configurations (.noArmor()). Programmatically loop 64 times over the output payload. In each iteration, encapsulate the previous binary output into a new PGPCompressedDataGenerator context configured with CompressionAlgorithmTags.ZIP. Pass the final 64-layer nested byte array stream directly to the SOP interface via sop.inlineDetach().message(nestedBytes).toByteArrayAndResult(). Observed Result: The library completely parses the highly nested structures, returning a successful outcome without raising any execution constraints. The code fails to throw the expected SOPGPException.BadData, proving that the 16-layer boundary constraint was completely bypassed during the streaming packet loop. ### Impact Who is impacted: Any downstream application, gateway, or mail client (such as FlowCrypt or any framework integrating the library's SOP wrapper interface/MessageInspector modules) that handles untrusted, incoming external user files or signed attachment streams. An attacker can use this behavior to systematically freeze application threads, exhaust target heap allocation metrics, and disrupt backend infrastructure services.

References

Source records: GHSA-cvx8-9ff6-54xq (OSV.dev) · EPSS by FIRST, 2026-11-26.