CVE-2026-54567
nicheCase-Bypass File Upload Flaw in Flask-Reuploaded 1.5.x Enables Web Shell Upload
Flask-Reuploaded versions 1.5.0 up to (but not including) 1.6.0 inconsistently handle extension casing when saving uploads: the default upload path is lowercased, but a caller-supplied name keeps its original mixed case when checked against an AllExcept extension denylist. An attacker who can influence the saved filename can therefore store a file with a mixed-case dangerous extension (for example .PhP) that bypasses the lowercase denylist but still executes where the server resolves extensions case-insensitively. On deployments where the served upload directory can execute scripts, the stored file runs with the web server's privileges and impacts confidentiality, integrity, and availability. Applications using pure allowlists, or that never pass user-controlled values as the name override, are not affected, and path-traversal containment is not bypassed. No public proof of concept or in-the-wild exploitation is known.
What to do: Upgrade Flask-Reuploaded to 1.6.0, which fixes the case-handling bug. As defense in depth, replace AllExcept denylists with an allowlist of safe extensions, avoid passing user-controlled values to the name= override, and configure the web server so the upload directory never executes scripts (disable handler mapping for that path). Audit already-stored uploads for mixed-case dangerous extensions (e.g., .PhP, .JsP) that may have bypassed denylists.
| flask-reuploaded project Flask-Reuploaded | >=1.5.0, <1.6.0 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Flask-Reuploaded provides file uploads for Flask. From 1.5.0 until 1.6.0, UploadSet.save(storage, name=...) in src/flask_uploads/flask_uploads.py applies lowercase_ext to the default upload path but uses the case-preserving extension helper for a caller-supplied name before extension_allowed evaluates an AllExcept denylist. An attacker who controls the name override can use a mixed-case dangerous extension to bypass a lowercase denylist and store the file in the served upload directory. Exploitation requires a denylist configuration, a user-influenced name override, and a deployment that resolves or executes extensions case-insensitively; pure allowlists remain protected and path containment is not bypassed. On an execution-capable upload directory, the stored file can execute with the web server's privileges and affect confidentiality, integrity, and availability. This issue is fixed in version 1.6.0.
- Weakness
- CWE-178, CWE-434
- Vector
- CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
In the news0 stories
No ingested article mentions this CVE yet.