CVE-2026-59200: Python Unbounded Zlib Decompression

Unbounded zlib decompression was detected. This can lead to memory exhaustion (decompression bomb) if the compressed data is attacker-controlled. The `zlib.decompress` function does not provide a way to limit the generated output length. Instead, use `zlib.decompressobj()` and call its `decompress()` method with a `max_length` parameter.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2026-59200-python-unbounded-zlib-decompression --engine opengrep

Description

Unbounded zlib decompression was detected. This can lead to memory exhaustion (decompression bomb) if the compressed data is attacker-controlled. The `zlib.decompress` function does not provide a way to limit the generated output length. Instead, use `zlib.decompressobj()` and call its `decompress()` method with a `max_length` parameter.