Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-27641

Flask-Reuploaded vulnerable to Remote Code Execution via Server-Side Template Injection
Back to all
CVE

CVE-2026-27641

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

  1. Do not pass user input to the name parameter
  2. Use auto-generated filenames only
  3. Implement strict input validation if name must 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.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
9.8
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
C
H
U
-

Related Resources

No items found.

References

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

Severity

9.8

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
9.8
EPSS Probability
0.00098%
EPSS Percentile
0.27018%
Introduced Version
0
Fix Available
1.5.0

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading