Vulnerabilities in pkg:pypi/zapros

PACKAGE
Advisory Identifier: GHSA-5vjj-2r48-q622
Advisory Summary

CVE-2026-61541 is a MODERATE denial of service vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Zapros libraries in the PyPI ecosystem. The issue involves zapros has an unbounded content-encoding decompression chain that allows denial of service. Remediation is available by upgrading affected packages to version 0.14.0.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/zapros

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/zapros. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-5vjj-2r48-q622 CVE-2026-61541 MODERATE Zapros has an Unbounded Content-Encoding decompression chain that allows denial of service
GHSA-6cp7-3m3c-5x5c CVE-2026-61652 HIGH Zapros: Streaming decoders ignored the requested chunk size, allowing a single compressed response chunk to allocate unbounded memory (decompression bomb)

CVE-2026-61541 at a Glance

CVE Identifier CVE-2026-61541
GHSA Identifier GHSA-5vjj-2r48-q622
Severity MODERATE
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-61541

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-61541, 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 **Who is impacted**: - Any application using Zapros to make HTTP requests to untrusted servers - Applications that follow redirects to attacker-controlled hosts **Attack vector**: - A malicious HTTP server returns a response with many chained content encodings. When the client attempts to decode, it creates a deeply nested decompression chain consuming excessive resources. ### Patches Fixed in version 0.14.0. The fix adds a hardcoded limit of **5** `Content-Encoding` layers. Responses exceeding this limit raise `DecodingError`. ### Workarounds Add middleware that checks for a malicious Content-Encoding header. ```python from typing import cast from zapros import ( AsyncBaseHandler, AsyncBaseMiddleware, BaseHandler, BaseMiddleware, Client, DecodingError, Request, Response, ) MAX_DECODE_LAYERS = 5 class ContentEncodingCheckMiddleware(BaseMiddleware, AsyncBaseMiddleware): def __init__( self, next_handler: BaseHandler | AsyncBaseHandler, *, max_layers: int = MAX_DECODE_LAYERS, ) -> None: self.next = cast(BaseHandler, next_handler) self.async_next = cast(AsyncBaseHandler, next_handler) self._max_layers = max_layers def _check(self, response: Response) -> None: encoding_header = response.headers.get("Content-Encoding") if not encoding_header: return layers = [enc.strip().lower() for enc in encoding_header.split(",") if enc.strip()] if len(layers) > self._max_layers: raise DecodingError(f"Too many Content-Encoding layers ({len(layers)}), maximum is {self._max_layers}") def handle(self, request: Request) -> Response: response = self.next.handle(request) self._check(response) return response async def ahandle(self, request: Request) -> Response: response = await self.async_next.ahandle(request) self._check(response) return response with Client().wrap_with_middleware(lambda next: ContentEncodingCheckMiddleware(next)) as client: ... ```

CVE-2026-61541 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-61541?
CVE-2026-61541 is a security vulnerability in Zapros involving Zapros has an Unbounded Content-Encoding decompression chain that allows denial of service 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-61541?
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-61541?
CVE-2026-61541 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-61541?
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-5vjj-2r48-q622",
  "modified" : "2026-09-23T13:58:35Z",
  "published" : "2026-09-23T13:58:35Z",
  "aliases" : [ "CVE-2026-61541" ],
  "summary" : "Zapros has an Unbounded Content-Encoding decompression chain that allows denial of service",
  "details" : "### Impact\n\n**Who is impacted**:\n  - Any application using Zapros to make HTTP requests to untrusted servers\n  - Applications that follow redirects to attacker-controlled hosts\n\n**Attack vector**:\n  - A malicious HTTP server returns a response with many chained content encodings. When the client attempts to decode, it creates a deeply nested decompression chain consuming excessive resources.\n\n### Patches\n\nFixed in version 0.14.0.\n\n  The fix adds a hardcoded limit of **5** `Content-Encoding` layers. Responses exceeding this limit raise `DecodingError`.\n\n### Workarounds\n\nAdd middleware that checks for a malicious Content-Encoding header.\n\n```python\nfrom typing import cast\n\nfrom zapros import (\n    AsyncBaseHandler,\n    AsyncBaseMiddleware,\n    BaseHandler,\n    BaseMiddleware,\n    Client,\n    DecodingError,\n    Request,\n    Response,\n)\n\nMAX_DECODE_LAYERS = 5\n\n\nclass ContentEncodingCheckMiddleware(BaseMiddleware, AsyncBaseMiddleware):\n    def __init__(\n        self,\n        next_handler: BaseHandler | AsyncBaseHandler,\n        *,\n        max_layers: int = MAX_DECODE_LAYERS,\n    ) -> None:\n        self.next = cast(BaseHandler, next_handler)\n        self.async_next = cast(AsyncBaseHandler, next_handler)\n        self._max_layers = max_layers\n\n    def _check(self, response: Response) -> None:\n        encoding_header = response.headers.get(\"Content-Encoding\")\n        if not encoding_header:\n            return\n\n        layers = [enc.strip().lower() for enc in encoding_header.split(\",\") if enc.strip()]\n        if len(layers) > self._max_layers:\n            raise DecodingError(f\"Too many Content-Encoding layers ({len(layers)}), maximum is {self._max_layers}\")\n\n    def handle(self, request: Request) -> Response:\n        response = self.next.handle(request)\n        self._check(response)\n        return response\n\n    async def ahandle(self, request: Request) -> Response:\n        response = await self.async_next.ahandle(request)\n        self._check(response)\n        return response\n\n\nwith Client().wrap_with_middleware(lambda next: ContentEncodingCheckMiddleware(next)) as client:\n    ...\n```",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/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-5vjj-2r48-q622"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-61541"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kap-sh/zapros/commit/7971fbca9707eb01455ca2d73416ac091f96908b"
  }, {
    "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" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-23T13:58:35Z",
    "nvd_published_at" : "2026-09-21T22:16:57Z"
  }
}