{"schema":"threatline.record/2","record":{"id":"CVE-2026-27641","aliases":["GHSA-65mp-fq8v-56jr","PYSEC-2026-341"],"summary":"Flask-Reuploaded vulnerable to Remote Code Execution via Server-Side Template Injection","details":"### Impact\nA 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).\n\n### Patches\nFlask-Reuploaded has been patched in version 1.5.0\n\n### Workarounds\n\n1. **Do not pass user input to the `name` parameter**\n2. Use auto-generated filenames only\n3. Implement strict input validation if `name` must be used\n\n```python\nfrom werkzeug.utils import secure_filename\nimport os\n\n# Sanitize user input before passing to save()\nsafe_name = secure_filename(request.form.get('custom_name'))\n# Remove path separators\nsafe_name = os.path.basename(safe_name)\n# Validate extension matches policy\nif not photos.extension_allowed(photos.get_extension(safe_name)):\n    abort(400)\n    \nfilename = photos.save(file, name=safe_name)\n```\n\n### Resources\nThe fix is documented in the pull request, see https://github.com/jugmac00/flask-reuploaded/pull/180.\n\nA 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.","categories":["Frameworks"],"product":"flask-reuploaded","vendor":"jugmac00","ecosystem":"pip","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-65mp-fq8v-56jr","source_modified_at":"2026-10-27T16:38:55Z","fetched_at":"2026-10-27T21:14:11.489891Z","package":{"ecosystem":"pip","name":"flask-reuploaded"},"range":"< 1.5.0"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-27641","source_modified_at":"2026-02-25T21:12:45.608Z","fetched_at":"2026-10-27T21:14:11.489891Z","product":"flask-reuploaded","vendor":"jugmac00","versions":[{"version":"< 1.5.0","status":"affected"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-65mp-fq8v-56jr","source_modified_at":"2026-10-27T17:00:03.992051129Z","fetched_at":"2026-10-27T21:14:11.489891Z","package":{"name":"flask-reuploaded","ecosystem":"PyPI","purl":"pkg:pypi/flask-reuploaded"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.5.0"}]}],"versions":["0.3","0.3.1","0.3.2","0.4.0","0.5.0","1.0.0","1.1.0","1.2.0","1.3.0","1.4.0"]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-65mp-fq8v-56jr","source_modified_at":"2026-10-27T16:38:55Z","fetched_at":"2026-10-27T21:14:11.489891Z","package":{"ecosystem":"pip","name":"flask-reuploaded"},"version":"1.5.0"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-65mp-fq8v-56jr","source_modified_at":"2026-10-27T17:00:03.992051129Z","fetched_at":"2026-10-27T21:14:11.489891Z","package":{"name":"flask-reuploaded","ecosystem":"PyPI","purl":"pkg:pypi/flask-reuploaded"},"version":"1.5.0"}],"cvss":9.8,"severity":"Critical","kev":{"listed":false},"epss":{"probability":0.01337,"percentile":0.71066,"score_date":"2026-10-27"},"published_at":"2026-02-25T03:54:54.391Z","modified_at":"2026-10-27T17:00:03.992051129Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-65mp-fq8v-56jr","fetched_at":"2026-10-27T21:14:11.489891Z","source_modified_at":"2026-10-27T16:38:55Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-27641","fetched_at":"2026-10-27T21:14:11.489891Z","source_modified_at":"2026-02-25T21:12:45.608Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-65mp-fq8v-56jr","fetched_at":"2026-10-27T21:14:11.489891Z","source_modified_at":"2026-10-27T17:00:03.992051129Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-27641","fetched_at":"2026-10-27T21:14:11.489891Z","source_modified_at":"2026-10-27"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/jugmac00/flask-reuploaded/security/advisories/GHSA-65mp-fq8v-56jr","tags":["x_refsource_CONFIRM"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27641","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/jugmac00/flask-reuploaded/pull/180","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/jugmac00/flask-reuploaded/commit/d64c6b2f71cb73734fc38baa0e3e156926361288","tags":["x_refsource_MISC"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/flask-reuploaded/PYSEC-2026-341.yaml","source":"GitHub Advisory Database"},{"url":"https://pypi.org/project/flask-reuploaded","source":"GitHub Advisory Database"},{"url":"https://github.com/advisories/GHSA-65mp-fq8v-56jr","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"none","automatable":"yes","technical_impact":"total","assessed_at":"2026-02-25T21:12:32.024132Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"product","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-27T17:00:03.992051129Z","content_hash":"c4506763b9a46875efcf4d2914b3068d20a0dbc9e5d4257a3e4c092c86ebdd13"}}
