{"id":"EEF-CVE-2026-32145","summary":"Multipart form body parser bypasses body size limits in wisp","details":"## Summary\n\nAllocation of Resources Without Limits or Throttling vulnerability in gleam-wisp wisp allows a denial of service via multipart form body parsing.\n\nThe `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`.\n\nAn unauthenticated attacker can exhaust server memory or disk by sending arbitrarily large multipart form submissions in a single HTTP request.\n\nThis issue affects wisp: from 0.2.0 before 2.2.2.\n\n## Workarounds\n\nDeploy a reverse proxy (such as nginx or HAProxy) in front of the wisp application and configure it to enforce request body size limits.","aliases":["CVE-2026-32145","GHSA-8645-p2v4-73r2"],"modified":"2026-11-25T17:23:04.442130372Z","published":"2026-04-02T10:30:47.485Z","database_specific":{"$schema":"https://cna.erlef.org/schemas/osv/record-0.1.0.json","capec_ids":["CAPEC-130"],"cpe_ids":["cpe:2.3:a:gleam-wisp:wisp:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-770"]},"references":[{"type":"ADVISORY","url":"https://github.com/gleam-wisp/wisp/security/advisories/GHSA-8645-p2v4-73r2"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-32145.html"},{"type":"WEB","url":"https://github.com/gleam-wisp/wisp/commit/d8e722e22ccb42bda9d0b6248658d37ab4e9b376"},{"type":"FIX","url":"https://github.com/gleam-wisp/wisp/commit/494476767cb29b905f364f07838d3c164a3c0571"},{"type":"FIX","url":"https://github.com/gleam-wisp/wisp/commit/7a978748e12ab29db232c222254465890e1a4a90"},{"type":"PACKAGE","url":"https://hex.pm/packages/wisp"}],"affected":[{"package":{"name":"wisp","ecosystem":"Hex","purl":"pkg:hex/wisp"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.2.0"},{"fixed":"2.2.2"}]}],"versions":["0.10.0","0.11.0","0.12.0","0.13.0","0.14.0","0.15.0","0.16.0","0.2.0","0.3.0","0.4.0","0.5.0","0.6.0","0.7.0","0.8.0","0.9.0","1.0.0","1.1.0","1.2.0","1.3.0","1.4.0","1.5.1","1.5.2","1.5.3","1.6.0","1.7.0","1.8.0","2.0.0","2.0.0-rc1","2.0.1","2.1.0","2.1.1","2.2.0","2.2.1"],"ecosystem_specific":{"program_files":["src/wisp.gleam"],"program_routines":["wisp:multipart_body/7","wisp:multipart_headers/5"],"$schema":"https://cna.erlef.org/schemas/osv/affected-0.1.0.json","modules":["wisp"]},"database_specific":{"modules":["wisp"],"source":"https://cna.erlef.org/osv/EEF-CVE-2026-32145.json","program_files":["src/wisp.gleam"],"program_routines":["wisp:multipart_body/7","wisp:multipart_headers/5"],"$schema":"https://cna.erlef.org/schemas/osv/affected-0.1.0.json"}},{"ranges":[{"type":"GIT","repo":"https://github.com/gleam-wisp/wisp","events":[{"introduced":"d8e722e22ccb42bda9d0b6248658d37ab4e9b376"},{"fixed":"494476767cb29b905f364f07838d3c164a3c0571"},{"fixed":"7a978748e12ab29db232c222254465890e1a4a90"}]}],"versions":["v2.2.1","v2.2.0","v2.1.1","v2.1.0","v2.0.1","v2.0.0","v2.0.0-rc1","v1.8.0","v1.7.0","v1.6.0","v1.5.3","v1.5.2","v1.5.1","v1.4.0","v1.3.0","v1.2.0","v1.1.0","v1.0.0","v0.16.0","v0.15.0","v0.14.0","v0.13.0","v0.12.0","v0.11.0","v0.10.0","v0.9.0","v0.8.0","v0.7.0","v0.6.0","v0.5.0","v0.4.0","v0.3.0","v0.2.0"],"database_specific":{"program_routines":["wisp:multipart_body/7","wisp:multipart_headers/5"],"$schema":"https://cna.erlef.org/schemas/osv/affected-0.1.0.json","modules":["wisp"],"program_files":["src/wisp.gleam"],"source":"https://cna.erlef.org/osv/EEF-CVE-2026-32145.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"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","source":"CNA"}],"credits":[{"name":"John Downey","type":"FINDER"},{"name":"Louis Pilfold","type":"REMEDIATION_DEVELOPER"}]}