Am I affected?

type your wisp version to check

Description

Allocation of Resources Without Limits or Throttling vulnerability in gleam-wisp wisp allows a denial of service via multipart form body parsing.

The multipart_body function bypasses configured max_body_size and max_files_size limits. When a multipart boundary is not present in a chunk, the parser takes the MoreRequiredForBody path, which appends the chunk to the output but passes the quota unchanged to the recursive call. Only the final chunk containing the boundary is counted via decrement_quota. The same pattern exists in multipart_headers, where MoreRequiredForHeaders recurses without calling decrement_body_quota.

An unauthenticated attacker can exhaust server memory or disk by sending arbitrarily large multipart form submissions in a single HTTP request.

This issue affects wisp: from 0.2.0 before 2.2.2.

Weaknesses & attack patterns

Weakness

CWE-770 · Allocation of Resources Without Limits or Throttling in catalog → MITRE ↗

Attack patterns

CAPEC-130 · Excessive Allocation MITRE ↗

Affected — Hex / wisp Hex.pm ↗ Repository ↗

0.2.0 < 2.2.2 affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:gleam-wisp:wisp:*:*:*:*:*:*:*:*
modules · source files · routines
modules wisp
source files src/wisp.gleam
routines wisp:multipart_body/7 · wisp:multipart_headers/5

Affected — GitHub / gleam-wisp/wisp Repository ↗

d8e722e < 7a97874 affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:gleam-wisp:wisp:*:*:*:*:*:*:*:*
modules · source files · routines
modules wisp
source files src/wisp.gleam
routines wisp:multipart_body/7 · wisp:multipart_headers/5

Workarounds

Deploy a reverse proxy (such as nginx or HAProxy) in front of the wisp application and configure it to enforce request body size limits.

References

Credits

John Downey Finder
Louis Pilfold Remediation developer

CVSS breakdown

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
« All CVEs