CVE-2026-76088: CVE-2026-76088: Unbounded Compressed Packet Descent Denial of Service in PGPainless
CVE-2026-76088: Unbounded Compressed Packet Descent Denial of Service in PGPainless Vulnerability ID: CVE-2026-76088 CVSS Score: 7.5 Published: 2026-11-19 A denial-of-service vulnerability (CWE-400) exists in PGPain
CVE-2026-76088: Unbounded Compressed Packet Descent Denial of Service in PGPainless
Vulnerability ID: CVE-2026-76088
CVSS Score: 7.5
Published: 2026-11-19
A denial-of-service vulnerability (CWE-400) exists in PGPainless versions prior to 1.7.8 and 2.0.x prior to 2.0.4 within the MessageInspector and InlineDetachImpl components. These components manually iterate over OpenPGP packet streams without enforcing the global 16-layer maximum nesting limit (MAX_LAYER_DEPTH). An unauthenticated remote attacker can supply a specially crafted OpenPGP message containing deeply nested PGPCompressedData packets to trigger unbounded recursive decompression, resulting in CPU starvation and Java Virtual Machine (JVM) heap exhaustion.
TL;DR
PGPainless fails to enforce packet nesting depth limits in MessageInspector and InlineDetachImpl. Processing deeply nested OpenPGP compressed data packets causes recursive decompression, leading to thread starvation and OutOfMemoryError crashes. Upgrade to version 1.7.8 or 2.0.4.
⚠️ Exploit Status: POC
Technical Details
- CVE ID: CVE-2026-76088 (GHSA-cvx8-9ff6-54xq)
- CWE ID: CWE-400: Uncontrolled Resource Consumption
- CVSS v3.1 Score: 7.5 High (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
- Attack Vector: Network / Remote, Unauthenticated
- Affected Components: MessageInspector (pgpainless-core), InlineDetachImpl (pgpainless-sop)
- Impact: Denial of Service via CPU Exhaustion and JVM OutOfMemoryError
- Patched Versions: 1.7.8 and 2.0.4
- CISA KEV Status: Not Listed
Affected Systems
- org.pgpainless:pgpainless-core
- org.pgpainless:pgpainless-sop
-
pgpainless-core: < 1.7.8 (Fixed in:
1.7.8) -
pgpainless-core: >= 2.0.0, < 2.0.4 (Fixed in:
2.0.4) -
pgpainless-sop: < 1.7.8 (Fixed in:
1.7.8) -
pgpainless-sop: >= 2.0.0, < 2.0.4 (Fixed in:
2.0.4)
Code Analysis
Commit: 9457277
Add missing guards for enforcing maximum packet nesting depth in MessageInspector and InlineDetachImpl (2.0.x branch)
--- a/pgpainless-core/src/main/kotlin/org/pgpainless/decryption_verification/MessageInspector.kt
+++ b/pgpainless-core/src/main/kotlin/org/pgpainless/decryption_verification/MessageInspector.kt
@@ -10,6 +10,8 @@ import org.bouncycastle.bcpg.KeyIdentifier
import org.bouncycastle.openpgp.*
import org.bouncycastle.openpgp.api.OpenPGPImplementation
import org.pgpainless.PGPainless
+import org.pgpainless.decryption_verification.MessageMetadata.Layer.Companion.MAX_LAYER_DEPTH
+import org.pgpainless.exception.MalformedOpenPgpMessageException
import org.pgpainless.util.ArmorUtils
/**
@@ -71,6 +73,7 @@ class MessageInspector(val api: PGPainless = PGPainless.getInstance()) {
var objectFactory = api.implementation.pgpObjectFactory(inputStream)
var n: Any?
+ var nestingDepth: Int = 0
while (objectFactory.nextObject().also { n = it } != null) {
when (val next = n!!) {
is PGPOnePassSignatureList -> {
@@ -93,6 +96,13 @@ class MessageInspector(val api: PGPainless = PGPainless.getInstance()) {
return EncryptionInfo(keyIdentifiers, isPassphraseEncrypted, false)
}
is PGPCompressedData -> {
+ // Guard packet nesting depth
+ nestingDepth++
+ if (nestingDepth > MAX_LAYER_DEPTH) {
+ throw MalformedOpenPgpMessageException(
+ "Maximum packet nesting depth ($MAX_LAYER_DEPTH) exceeded.")
+ }
+
objectFactory =
OpenPGPImplementation.getInstance()
.pgpObjectFactory(PGPUtil.getDecoderStream(next.dataStream))
Commit: 7662f08
Backport fix enforcing maximum packet nesting depth in MessageInspector and InlineDetachImpl (1.7.x branch)
Mitigation Strategies
- Upgrade PGPainless artifacts (pgpainless-core and pgpainless-sop) to version 1.7.8 or 2.0.4 to enforce the 16-layer maximum packet nesting depth.
- Wrap untrusted OpenPGP input and decompressed output streams in size-bounded stream wrappers (e.g., BoundedInputStream) to limit total processed byte volume.
- Execute OpenPGP message inspection and inline-detach routines within bounded worker pools configured with strict execution timeouts.
Remediation Steps:
- Audit project dependency trees (via './gradlew dependencies' or 'mvn dependency:tree') to identify all direct and transitive uses of org.pgpainless:pgpainless-core and org.pgpainless:pgpainless-sop.
- Update build configurations to specify version 1.7.8 (for 1.x deployments) or 2.0.4 (for 2.x deployments).
- Ensure exception handlers around MessageInspector and InlineDetach calls properly catch and log org.pgpainless.exception.MalformedOpenPgpMessageException.
- Rebuild and redeploy the affected applications and monitor logs for packet nesting depth exceptions.
References
- GitHub Security Advisory: GHSA-cvx8-9ff6-54xq
- Official Fix Commit (2.0.x Branch)
- Official Fix Commit (1.7.x Branch)
- PGPainless Release 2.0.4
- PGPainless Release 1.7.8
- National Vulnerability Database (NVD) - CVE-2026-76088
- CVE.org Record: CVE-2026-76088
- Official cvelistV5 Repository Record
Read the full report for CVE-2026-76088 on our website for more details including interactive diagrams and full exploit analysis.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.