CVE-2026-61541: Zapros Unbounded Content-Encoding Decompression Chain Vulnerability

zapros Updated 23 Sep 2026

Summary

23/09/2026
Yes i
Moderate
6.9

CVE-2026-61541: Zapros has an Unbounded Content-Encoding decompression chain that allows denial of service. Affects zapros versions < 0.14.0. Fixed in 0.14.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Zapros is a Python library designed for making HTTP requests, particularly useful for applications that need to interact with web services. It provides a simple interface for sending requests and handling responses. However, it is vulnerable to a specific issue where it can be exploited by malicious HTTP servers through unbounded content encoding, leading to denial of service.

Vulnerability Detail

The vulnerability arises from the ability of a malicious HTTP server to return a response with multiple chained content encodings. When the Zapros client attempts to decode these encodings, it creates a deeply nested decompression chain that consumes excessive system resources. This can lead to denial of service, affecting the application's performance and availability. The vulnerability primarily impacts applications that make HTTP requests to untrusted servers or follow redirects to potentially malicious hosts.

How To Fix

Latest published version: 0.22.0 as of 22 Oct 2026

pip install --upgrade "zapros==0.22.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.14.0

This is the first release that contains the fix.

pip install --upgrade "zapros==0.14.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can implement middleware to check for excessive Content-Encoding layers in the response. Below is a sample implementation in Python:

from typing import cast
from zapros import (
    AsyncBaseHandler,
    AsyncBaseMiddleware,
    BaseHandler,
    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:
    ...

Conclusion

The Zapros library has a vulnerability (CVE-2026-61541) that allows for denial of service through unbounded content encoding. Users are advised to update to version 0.14.0 or later to mitigate this risk. Implementing middleware can serve as a temporary workaround while updates are applied.

See every vulnerability recorded for zapros →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 6.9, indicating a moderate severity level.

Any application using Zapros to make HTTP requests to untrusted servers or that follows redirects to attacker-controlled hosts is affected.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

You can implement the provided middleware workaround to check for excessive Content-Encoding layers in responses until you can update the package.

The denial of service occurs due to excessive resource consumption when decoding deeply nested content encodings from malicious HTTP responses.

Related vulnerabilities

Recent vulnerabilities recorded for zapros.

How To Fix

Latest published version: 0.22.0 as of 22 Oct 2026

pip install --upgrade "zapros==0.22.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.14.0

This is the first release that contains the fix.

pip install --upgrade "zapros==0.14.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback