High

aiosend: Deserialization of request body before signature verification (Pre-auth DoS) in webhook handler

  • Disclosed: 22.05.2026
  • Updated: 11.10.2026 14:19

Summary

WebhookHandler.feed_update() deserializes the entire request body before verifying the HMAC signature. This allows an unauthenticated attacker to force expensive parsing of arbitrary JSON payloads that will ultimately be rejected, leading to unnecessary CPU and memory consumption.

Severity

High (CVSS 7.5)

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected Package

  • Ecosystem: PyPI
  • Package: aiosend

Affected Versions

  • < 3.0.6

Patched Versions

  • >= 3.0.6

Details

In aiosend/webhook/base.py, WebhookHandler.feed_update() performs full Pydantic deserialization before validating the webhook signature:

python
update = Update.model_validate(body, context={"client": self})
if not self._check_signature(body, headers):
    return False

Because authentication occurs only after parsing, anyone can send arbitrarily large JSON payloads with an invalid signature. Although the request is rejected, the server still performs all parsing work.

Additionally, CryptoPayObject is configured with:

python
ConfigDict(extra="allow")

allowing arbitrary extra fields to be retained in memory, increasing resource consumption.

Impact

An unauthenticated attacker can repeatedly send large invalid webhook requests, forcing the server to consume CPU time and memory before rejecting them.

This results in a pre-authentication denial-of-service condition affecting all webhook integrations.

Affected Components

  • aiosend/webhook/base.py
  • aiosend/types/base.py
  • AiohttpManager
  • FastAPIManager
  • FlaskManager

Workarounds

Until upgrading:

  • Restrict request body size at the reverse proxy or web framework.
  • Rate-limit webhook endpoints.
  • Reject oversized requests before JSON parsing.

Solution

Upgrade to aiosend 3.0.6 or later.

CWE

  • CWE-400: Uncontrolled Resource Consumption

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) aiosend < 3.0.7 3.0.7

References

CVSS score 7.5/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness (CWE)
CWE-400
Platform
Python (PyPI)
Package
aiosend
Disclosed
22.05.2026
Updated
11.10.2026 14:19

Sources and licenses

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

OSV / GitHub Advisory Database - GHSA-7m8f-hgjq-8gc9 - CC BY 4.0

Vulnerability history: aiosend

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

This is the only known vulnerability of this package.

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.