salvo
Affected
- introduced
0, fixed0.89.3(semver)
Fixed versions
0.89.3
Fix
- Fixed version
0.89.3cargo update -p salvo --precise 0.89.3
Advisory
Also known as: CVE-2026-33241
Salvo Affected by Denial of Service via Unbounded Memory Allocation in Form Data Parsing
Summary
Salvo's form data parsing implementations (form_data() method and Extractible macro) do not enforce payload size limits before reading request bodies into memory. This allows attackers to cause Out-of-Memory (OOM) conditions by sending extremely large payloads, leading to service crashes and denial of service.
Details
Vulnerability Description
Three attack vectors exist in Salvo's form handling:
application/x-www-form-urlencoded)Request::form_data() calls BodyExt::collect(body) which reads the entire body into memory without size checkingreq.form_data().await directlymultipart/form-data)#[derive(Extractible)] with #[salvo(extract(default_source(from = "body")))] internally calls form_data()Root Cause
The FormData::read() implementation prioritizes convenience over safety by reading entire request bodies before validation. Even when Request::payload_with_max_size() is available, it's not automatically applied in the form parsing path.
PoC
Extract data from request example in readme.md in docker file with limited memory say 100mb.application/x-www-form-urlencoded OR multipart/form-data payload to the endpoint.Impact
Immediate Effects
Attack Characteristics
Real-World Scenarios
#[derive(Extractible)] with body sourcesSuggestion: Make Multipart File Upload Handling Explicit Opt-In
Problem Statement
Currently, Salvo's multipart form data parsing automatically handles file uploads without explicit developer intent. This creates several security and usability concerns:
High Basis: The source's own band: HIGH
0, fixed 0.89.3 (semver)0.89.3
0.89.3cargo update -p salvo --precise 0.89.3Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0