CVE-2026-27641 — Vulnerability in flask-reuploaded — CVE Details
Flask-Reuploaded vulnerable to Remote Code Execution via Server-Side Template Injection
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (1.47%). Schedule for your next planned update.
Does your project use an affected flask-reuploaded version?
Paste your requirements.txt to check it for CVE-2026-27641 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Impact
A critical path traversal and extension bypass vulnerability in Flask-Reuploaded allows remote attackers to achieve arbitrary file write and remote code execution through Server-Side Template Injection (SSTI).
Patches
Flask-Reuploaded has been patched in version 1.5.0
Workarounds
- Do not pass user input to the
nameparameter - Use auto-generated filenames only
- Implement strict input validation if
namemust be used
from werkzeug.utils import secure_filename
import os
# Sanitize user input before passing to save()
safe_name = secure_filename(request.form.get('custom_name'))
# Remove path separators
safe_name = os.path.basename(safe_name)
# Validate extension matches policy
if not photos.extension_allowed(photos.get_extension(safe_name)):
abort(400)
filename = photos.save(file, name=safe_name)
Resources
The fix is documented in the pull request, see https://github.com/jugmac00/flask-reuploaded/pull/180.
A proper write-up was created by the reporter of the vulnerability, Jaron Cabral (https://www.linkedin.com/in/jaron-cabral-751994357/), but is not yet available as of time of this publication.
Advisory Timeline
- First published February 25, 2026 (274 days ago).
- Last revised October 27, 2026 — 244 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "flask-reuploaded>=1.5.0"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: PyPI (1).
| Package | Fixed In |
|---|---|
| flask-reuploaded PyPI · Affected: 0.3, 0.3.1, 0.3.2, 0.4.0 (+6 more) | 1.5.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-1336
- CWE-22Path TraversalMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/jugmac00/flask-reuploaded/security/advisories/GHSA-65mp-fq8v-56jrWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-27641ADVISORY
- https://github.com/jugmac00/flask-reuploaded/pull/180WEB
- https://github.com/jugmac00/flask-reuploaded/commit/d64c6b2f71cb73734fc38baa0e3e156926361288WEB
- https://github.com/jugmac00/flask-reuploadedPACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/flask-reuploaded/PYSEC-2026-341.yamlWEB
- https://pypi.org/project/flask-reuploadedWEB
Frequently Asked Questions
- What is CVE-2026-27641?
- Flask-Reuploaded vulnerable to Remote Code Execution via Server-Side Template Injection. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
- How do I check if my project is affected by CVE-2026-27641?
- CVE-2026-27641 affects flask-reuploaded. It has a 1.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-27641 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is an above-median EPSS score — 74.1% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-77359CRITICAL
Jupyter MCP Server: Browser DNS rebinding can hijack the Jupyter backend through management routes
- CVE-2026-77312CRITICAL
Flyto2 Core: Arbitrary file write via unguarded data.*/file.* modules (incomplete fix of CVE-2026-67429)