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:
URL-encoded form data (
application/x-www-form-urlencoded)Request::form_data()callsBodyExt::collect(body)which reads the entire body into memory without size checking- Affects handlers using
req.form_data().awaitdirectly
Multipart form data (
multipart/form-data)- Similar unbounded memory allocation during parsing
- Affects handlers processing multipart uploads
Extractible macro
#[derive(Extractible)]with#[salvo(extract(default_source(from = "body")))]internally callsform_data()- Vulnerabilities propagate to all extractors using body sources
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
- run
Extract data from requestexample in readme.md in docker file with limited memory say 100mb. - Send
application/x-www-form-urlencodedORmultipart/form-datapayload to the endpoint. - The server process OOM-crashes, instead of returning 413 error.
Immediate Effects
- Service Unavailability: Servers crash under memory pressure
- Resource Exhaustion: Single request can consume all available memory
- Cascading Failures: In containerized environments, OOM can affect other services
Attack Characteristics
- Low Cost: Attacker needs minimal bandwidth (header only, body can be streamed)
- No Authentication: Exploitable on public endpoints
- Difficult to Rate-Limit: Traditional rate limiting may not prevent single large request
- Amplification: Small network cost → large memory consumption
Real-World Scenarios
- Public API endpoints accepting form data
- User registration/profile update handlers
- File upload endpoints using multipart forms
- Any endpoint using
#[derive(Extractible)]with body sources
Suggestion: 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:
- Unintended File Storage: Developers may unknowingly accept file uploads when they only intended to handle text fields
- Disk Space Exhaustion: Automatic file buffering to disk can fill storage without proper limits
- Resource Cleanup: Temporary files may not be properly cleaned up if handlers don't expect them
- Attack Surface: Endpoints inadvertently become file upload targets
Impact
The application allocates resources such as memory, threads, or file descriptors based on untrusted input without enforcing a cap. Typical impact: resource exhaustion leading to denial of service.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-33241? CVE-2026-33241 is a high-severity allocation of resources without limits or throttling vulnerability in salvo (rust), affecting versions < 0.89.3. It is fixed in 0.89.3. The application allocates resources such as memory, threads, or file descriptors based on untrusted input without enforcing a cap.
- Which versions of salvo are affected by CVE-2026-33241? salvo (rust) versions < 0.89.3 is affected.
- Is there a fix for CVE-2026-33241? Yes. CVE-2026-33241 is fixed in 0.89.3. Upgrade to this version or later.
- Is CVE-2026-33241 exploitable, and should I be worried? Whether CVE-2026-33241 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-33241 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-33241? Upgrade
salvoto 0.89.3 or later.