Skip to content

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

High severity GitHub Reviewed Published May 16, 2026 in vovchic17/aiosend • Updated May 22, 2026

Package

pip aiosend (pip)

Affected versions

< 3.0.6

Patched versions

3.0.6

Description

Vulnerability Description

In aiosend/webhook/base.py, the WebhookHandler.feed_update() method performs full deserialization of the incoming JSON via Pydantic before verifying the HMAC signature. Anyone can send a request with an arbitrary body — the server will parse it, spend CPU and memory, and only then reject it.

Vulnerable Code

# aiosend/webhook/base.py — feed_update()
update = Update.model_validate(body, context={"client": self})  #  parsing — always
if not self._check_signature(body, headers):                    #  auth — too late
    return False

Additional aggravating factor: CryptoPayObject is declared with ConfigDict(extra="allow") — all arbitrary fields from the body are stored in memory without any limits.

Minimal PoC

Requests with deliberately invalid signatures (zero credentials):

extra_fields body_size parse_time status
0 336 B 26 µs 403 REJECTED
1,000 82 KB 257 µs 403 REJECTED
5,000 410 KB 1,183 µs 403 REJECTED
10,000 820 KB 2,552 µs 403 REJECTED
10,000 (×512B) 5.3 MB 7,490 µs 403 REJECTED

All requests were rejected — but the server already performed parsing for each one. 10 parallel threads with 5 MB bodies = >75 ms of CPU spent on requests that will never be authorized.

Affected Components

  • aiosend/webhook/base.pyWebhookHandler.feed_update()
  • aiosend/types/base.pyCryptoPayObject (extra="allow")
  • All adapters: AiohttpManager, FastAPIManager, FlaskManager

Exploitation Conditions

  • Attacker: anyone with network access to the webhook endpoint
  • Authentication: not required
  • Body size limit: absent at the library level (Flask and FastAPI have no default limit)

The advisory was translated using Copilot.

References

@vovchic17 vovchic17 published to vovchic17/aiosend May 16, 2026
Published to the GitHub Advisory Database May 22, 2026
Reviewed May 22, 2026
Last updated May 22, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

EPSS score

Weaknesses

Uncontrolled Resource Consumption

The product does not properly control the allocation and maintenance of a limited resource. Learn more on MITRE.

CVE ID

No known CVE

GHSA ID

GHSA-7m8f-hgjq-8gc9

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.