Medium, CVSS 6.5npmAmendedPublished
PDFME Affected by Decompression Bomb in FlateDecode Stream Parsing Causes Memory Exhaustion DoS
CVE-2026-82864 · GHSA-vrqm-gvq7-rrwh
- Affected
- npm @pdfme/pdf-lib <= 5.5.9
- Fixed in
- 5.5.10· Vendor fix available
- Issue
- The DecodeStream.ensureBuffer() method in @pdfme/pdf-lib doubles its internal buffer without any upper bound on the decompressed size. A crafted PDF containing a FlateDecode stream with a high compression ratio (decompression bomb) causes unbounded memory allocation during stream decoding, leading to memory exhaustion and denial of service in both server-side (generator) and client-side (UI) contexts. Details The vulnerability exists in the DecodeStream class, which is the base class for all stream decoders including FlateStream (DEFLATE/zlib decompression). Unbounded buffer growth in ensureBuffer() — packages/pdf-lib/src/core/streams/DecodeStream.ts:148-160: The size = 2 loop has no maximum size check. The buffer will continue doubling until the process runs out of memory. Unconditional full decompression in decode() — DecodeStream.ts:139-141: FlateStream.readBlock() calls ensureBuffer() repeatedly during decompression —…
Recommended action: Upgrade to 5.5.10 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.