CVE-2026-61652: Zapros Streaming Decoders Ignored The Requested Vulnerability

HIGH
Advisory Identifier: GHSA-6cp7-3m3c-5x5c
CWE-770
Published
Advisory Summary

CVE-2026-61652 is a HIGH streaming decoders ignored the requested vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Zapros libraries in the PyPI ecosystem. The issue involves streaming decoders ignored the requested chunk size, allowing a single compressed response chunk to allocate unbounded memory (decompression bomb). Remediation is available by upgrading affected packages to version 0.14.0.

CVE-2026-61652 at a Glance

CVE Identifier CVE-2026-61652
GHSA Identifier GHSA-6cp7-3m3c-5x5c
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Zapros
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-61652

To remediate this vulnerability, upgrade all affected Zapros dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

zapros fixed: 0.14.0
pip install zapros>=0.14.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show zapros

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-61652, inspect your installed packages using pip:

pip show zapros

Analyze the terminal output to locate any version of Zapros in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.14.0), your application is affected.

Note: The pip show zapros command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Zapros, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

CVE-2026-61652 Affected Zapros Versions

1 component(s)
Fixed Versions:
0.14.0
Product / Package Ecosystem Affected Versions Fixed Version
zapros
PyPI
< 0.14.0
0.14.0

References

Frequently Asked Questions

What is CVE-2026-61652?
CVE-2026-61652 is a security vulnerability in Zapros involving Streaming decoders ignored the requested chunk size, allowing a single compressed response chunk to allocate unbounded memory (decompression bomb) under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Zapros versions are affected?
Affected versions include releases prior to 0.14.0 across affected packages: zapros.
What version fixes CVE-2026-61652?
Upgrading to 0.14.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zapros affected?
Yes, zapros is affected in releases prior to 0.14.0. Upgrade your dependency to 0.14.0 or later.
What CWE is associated with CVE-2026-61652?
CVE-2026-61652 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check PyPI dependencies for CVE-2026-61652?
Run the dependency tree command: 'pip show zapros'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6cp7-3m3c-5x5c",
  "modified" : "2026-09-23T13:57:48Z",
  "published" : "2026-09-23T13:57:48Z",
  "aliases" : [ "CVE-2026-61652" ],
  "summary" : "Zapros: Streaming decoders ignored the requested chunk size, allowing a single compressed response chunk to allocate unbounded memory (decompression bomb)",
  "details" : "### Impact\n\nDenial 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.\n\n```python\nimport gzip, zapros\n\n# Server returns ~1 GiB of zeros gzip-compressed to ~1 MiB,\n# with header: Content-Encoding: gzip\nbomb = gzip.compress(b\"\\0\" * 1_000_000_000)  # ~1 MiB on the wire\n\nwith zapros.stream(\"GET\", \"https://malicious.example/bomb\") as response:\n    # Caller asks for 8 KiB chunks, expecting bounded memory:\n    for chunk in response.iter_bytes(chunk_size=8192):\n        ...  # first `chunk` is ~1 GiB, not 8 KiB -> memory exhaustion\n```\n\n### Patches\n\nUpgrade 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.\n\n### Workarounds\n\nFor unpatched versions:\n- 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.\n- Where feasible, send `Accept-Encoding: identity` to disable response compression so bodies are not decompressed client-side.\n- Avoid decoding response bodies from untrusted servers.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "zapros"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.14.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/kap-sh/zapros/security/advisories/GHSA-6cp7-3m3c-5x5c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-61652"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kap-sh/zapros/commit/9b59fa65857734599c34b0b3dff4c2b62293a68d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kap-sh/zapros"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kap-sh/zapros/releases/tag/v0.14.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-23T13:57:48Z",
    "nvd_published_at" : "2026-09-21T22:16:57Z"
  }
}