Loading...
Skip to main content

CVE-2026-27641 — Vulnerability in flask-reuploaded — CVE Details

CRITICAL

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

Published February 25, 2026Updated June 29, 2026Source: osv

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 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 ```python 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 (229 days ago).
  • Last revised June 29, 2026 — 124 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

pip
Update flask-reuploaded to 1.5.0 or later
pip install "flask-reuploaded>=1.5.0"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: pypi (1).

PackageEcosystemAffectedFixed In
flask-reuploaded
pypi
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.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

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. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-27641 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-65mp-fq8v-56jr
PYSEC-2026-341

Related CVEs

  • CVE-2026-61447
    CRITICAL

    PraisonAI: CodeAgent Executes LLM-Generated Code Without Sandboxing and Leaks All Environment Secrets

  • CVE-2026-61445
    CRITICAL

    PraisonAI: AICoder Arbitrary File Write and Command Execution via LLM Tool Calls

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies