# Potential DoS vulnerability in Django in multipart parser

Django's multipart parser opened a temp file per file-part with no limit, letting a single request exhaust file descriptors and memory to cause DoS.

- Payout: $2,400
- Severity: medium
- Program: Internet Bug Bounty
- Found by: das7pad
- Disclosed: 2023-03-20
- CVE: CVE-2023-24580
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/1904097
- Library page: https://bugbountylibrary.com/r/h1%3A1904097
- Tags: area:web domain:web impact:dos kind:bounty platform:hackerone sev:medium tech:python technique:source-review vuln:dos

**Target:** Django multipart request parser (file uploads / POST endpoints)
**Root cause:** The multipart parser processed an unbounded number of empty/file parts, opening and holding a new temporary file per part for the request duration, with no cap on part/file count.
**Steps:**
1. Send a POST multipart/form-data request to any form/POST endpoint.
2. Include a very large number of file parts (or empty parts) in the body.
3. Parser opens a temp file per part and keeps them open for the whole request.
4. Repeat/parallelize to exhaust file descriptors and memory.
**How found:** Researcher analyzed the multipart parser's handling of parts and noticed it opened a temp file per part with no limit on part count, then coordinated disclosure with multiple vendors on the shared DoS vector.
**Exploitation:** Attacker submits a single multipart request with an unbounded number of file parts; each part opens a temp file held open for the request, exhausting file descriptors and memory, causing OOM kill and leftover open files leading to disk/inode exhaustion.
**Insight:** When auditing parsers, count per-item resource allocation (temp files, handles, buffers) against attacker-controlled item counts; unbounded part/element counts are a DoS class independent of payload size.

