Hoch

Zapros: Streaming decoders ignored the requested chunk size, allowing a single compressed response chunk to allocate unbounded memory (decompression bomb)

  • Veröffentlicht: 23.09.2026
  • Aktualisiert: 11.10.2026 15:18

Impact

Denial of service via memory exhaustion. Affects all callers who streamed compressed responses relying on the chunk size — explicit (iter_bytes(chunk_size=...)) or the default — to bound memory. The decoder ignored that bound, so a chunk could be far larger than requested and a single compressed response could overflow memory.

python
import gzip, zapros

# Server returns ~1 GiB of zeros gzip-compressed to ~1 MiB,
# with header: Content-Encoding: gzip
bomb = gzip.compress(b"\0" * 1_000_000_000)  # ~1 MiB on the wire

with zapros.stream("GET", "https://malicious.example/bomb") as response:
    # Caller asks for 8 KiB chunks, expecting bounded memory:
    for chunk in response.iter_bytes(chunk_size=8192):
        ...  # first `chunk` is ~1 GiB, not 8 KiB -> memory exhaustion

Patches

Upgrade to 0.14.0 or later. The decoders now bound the output of each decompression step to the requested chunk_size: gzip/deflate via zlib's max_length + unconsumed_tail, brotli via output_buffer_limit, and zstd via a bounded stream_writer. Peak memory during streaming decode is now proportional to chunk_size for all supported encodings.

Workarounds

For unpatched versions:

  • Read the still-compressed body with Response.iter_raw() / Response.async_iter_raw(), which bypass the built-in decoders, and decompress it yourself with an explicit output-size bound (e.g. zlib's max_length), aborting once a configured limit is exceeded.
  • Where feasible, send Accept-Encoding: identity to disable response compression so bodies are not decompressed client-side.
  • Avoid decoding response bodies from untrusted servers.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) zapros < 0.14.0 0.14.0

Verweise

CVSS-Wert -
CVSS-Vektor
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Schwäche (CWE)
CWE-770
Plattform
Python (PyPI)
Paket
zapros
Veröffentlicht
23.09.2026
Aktualisiert
11.10.2026 15:18

Quellen und Lizenzen

OSV / GitHub Advisory Database - PYSEC-2026-4182 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-6cp7-3m3c-5x5c - CC BY 4.0

Schwachstellenhistorie: zapros

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Einträge insgesamt
2
Erste → letzte
09.2026 09.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Hoch 1
  • Mittel 1

Veröffentlichungen pro Jahr

  1. 2026: 2
  1. Zapros: Streaming decoders ignored the requested chunk size, allowing a single compressed response chunk to allocate unbounded memory (decompression bomb) dieser Eintrag
    Hoch CVE-2026-61652 < 0.14.0 0.14.0

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.