wisp has Allocation of Resources Without Limits or Throttling

Description

Summary

A multipart form parsing bug allows any unauthenticated user to bypass configured request size limits and trigger a denial of service by exhausting server memory or disk.

Details

The issue is in the multipart parsing logic, specifically in multipart_body and multipart_headers.

When parsing multipart data, the implementation distinguishes between:
- chunks where a boundary is found
- chunks where more data is required

In the normal case (boundary found), the parser correctly accounts for consumed bytes by calling decrement_quota.

However, in the MoreRequiredForBody branch, the parser appends incoming data to the output but recurses without decrementing the quota. This means that any chunk that does not contain the multipart boundary is effectively “free” from a quota perspective. Only the final chunk, the one containing the boundary, is counted.

The same pattern exists in multipart_headers, where MoreRequiredForHeaders also recurses without decrementing the quota.

As a result, an attacker can send arbitrarily large multipart bodies split across many chunks that avoid the boundary. The parser will accumulate the data (in memory for form fields, on disk for file uploads) without enforcing max_body_size or max_files_size.

Impact

This is a denial of service vulnerability caused by uncontrolled resource consumption.

Any application using require_form or require_multipart_form on user-controlled input is affected. An unauthenticated attacker can send large multipart requests that bypass configured limits and cause:

  • memory exhaustion (for form fields accumulated in memory)
  • disk exhaustion (for file uploads written to temporary storage)

In both cases, the application may become unavailable or be terminated by the operating system.

Workaround

Deploy a reverse proxy (such as nginx or HAProxy) in front of the application and enforce request body size limits there. This ensures large multipart requests are rejected before they reach the vulnerable parser.

Resources

  • Introducing commit: https://github.com/gleam-wisp/wisp/commit/d8e722e22ccb42bda9d0b6248658d37ab4e9b376
  • Fix commit: https://github.com/gleam-wisp/wisp/commit/7a978748e12ab29db232c222254465890e1a4a90

Basic information

Type
reviewed
Severity
high
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2026-04-03 03:40:30 UTC
Updated
2026-04-06 23:17:48 UTC
GitHub reviewed
2026-04-03 03:40:30 UTC
NVD published
2026-04-02

EPSS Score

Score Percentile
0.02% 4.74%

CVSS Scores

Base score Version Severity Vector
8.7 4.0
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 Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network.
Attack complexity (AC:L)
Exploitation conditions are straightforward and stable.
Attack requirements (AT:N)
No additional preconditions are required beyond normal reachability.
Privileges required (PR:N)
No privileges are required.
User interaction (UI:N)
No user interaction is required.
Vulnerable system confidentiality impact (VC:N)
No confidentiality impact on the vulnerable system.
Vulnerable system integrity impact (VI:N)
No integrity impact on the vulnerable system.
Vulnerable system availability impact (VA:H)
High availability impact on the vulnerable system.
Subsequent system confidentiality impact (SC:N)
No confidentiality impact on subsequent systems.
Subsequent system integrity impact (SI:N)
No integrity impact on subsequent systems.
Subsequent system availability impact (SA:N)
No availability impact on subsequent systems.

Identifiers

CWEs

CWE id Name
CWE-770 Allocation of Resources Without Limits or Throttling

Credits

  • jtdowney (reporter)
  • lpil (remediation_developer)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
erlang wisp < 2.2.2 2.2.2

References

cvelogic Threat Intelligence