Flask-Reuploaded vulnerable to Remote Code Execution via Server-Side Template Injection
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.
Czego dotyczy
Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.
| Platforma | Paczka | Podatne wersje | Poprawka w wersji |
|---|---|---|---|
| Python (PyPI) | flask-reuploaded | < 1.5.0 | 1.5.0 |
Odnośniki
- https://github.com/jugmac00/flask-reuploaded/security/advisories/GHSA-65mp-fq8v-56jr
- https://nvd.nist.gov/vuln/detail/CVE-2026-27641
- https://github.com/jugmac00/flask-reuploaded/pull/180
- https://github.com/jugmac00/flask-reuploaded/commit/d64c6b2f71cb73734fc38baa0e3e156926361288
- https://github.com/jugmac00/flask-reuploaded
- https://pypi.org/project/flask-reuploaded
- https://github.com/advisories/GHSA-65mp-fq8v-56jr
- Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- Słabość (CWE)
CWE-1336, CWE-22- Platforma
- Python (PyPI)
- Paczka
flask-reuploaded- Ujawniono
- 25.02.2026
- Aktualizacja
- 11.10.2026 12:20
Źródła i licencje
OSV / GitHub Advisory Database - GHSA-65mp-fq8v-56jr - CC BY 4.0
OSV / GitHub Advisory Database - PYSEC-2026-341 - PyPA Advisory Database; CC BY 4.0
Historia podatności: flask-reuploaded
Wszystkie opisane podatności tej paczki (Python (PyPI)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.
- Wszystkich wpisów
- 2
- Pierwsza → ostatnia
- 02.2026 07.2026
- Bez poprawki
- 0
- Wykorzystywana w atakach
- 0
Rozkład istotności
- Krytyczna 1
- Wysoka 1
Ujawnienia w latach
- 2026: 2
-
Flask-Reuploaded vulnerable to Remote Code Execution via Server-Side Template Injection ten wpis
Dowiedz się, które podatności dotyczą Twojej aplikacji
Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.