Skip to content

Commit 312cb1f

Browse files
1 parent 75a302a commit 312cb1f

2 files changed

Lines changed: 137 additions & 0 deletions

File tree

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-65mp-fq8v-56jr",
4+
"modified": "2026-02-25T19:06:50Z",
5+
"published": "2026-02-25T19:06:50Z",
6+
"aliases": [
7+
"CVE-2026-27641"
8+
],
9+
"summary": "Flask-Reuploaded vulnerable to Remote Code Execution via Server-Side Template Injection",
10+
"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.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "PyPI",
21+
"name": "flask-reuploaded"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "1.5.0"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/jugmac00/flask-reuploaded/security/advisories/GHSA-65mp-fq8v-56jr"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27641"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/jugmac00/flask-reuploaded/pull/180"
50+
},
51+
{
52+
"type": "WEB",
53+
"url": "https://github.com/jugmac00/flask-reuploaded/commit/d64c6b2f71cb73734fc38baa0e3e156926361288"
54+
},
55+
{
56+
"type": "PACKAGE",
57+
"url": "https://github.com/jugmac00/flask-reuploaded"
58+
}
59+
],
60+
"database_specific": {
61+
"cwe_ids": [
62+
"CWE-1336"
63+
],
64+
"severity": "CRITICAL",
65+
"github_reviewed": true,
66+
"github_reviewed_at": "2026-02-25T19:06:50Z",
67+
"nvd_published_at": "2026-02-25T04:16:04Z"
68+
}
69+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-mw8m-398g-h89w",
4+
"modified": "2026-02-25T19:07:44Z",
5+
"published": "2026-02-25T19:07:44Z",
6+
"aliases": [
7+
"CVE-2026-27645"
8+
],
9+
"summary": "changedetection.io Vulnerable to Reflected XSS in RSS Single Watch Error Response",
10+
"details": "### Summary\nThree security vulnerabilities were identified in [changedetection.io](http://changedetection.io/) through source code review and live validation against a locally deployed Docker instance. All vulnerabilities were confirmed exploitable on the latest version (0.53.6) it was additionally validated at scale against 500 internet-facing instances discovered via FOFA search engine, producing 5K+ confirmed detections using a custom Nuclei template, demonstrating widespread real-world impact.\nThe RSS single-watch endpoint reflects the UUID path parameter directly in the HTTP response body without HTML escaping. Since Flask returns text/html by default for plain string responses, the browser parses and executes injected JavaScript.\n\n### Details\nFile: `changedetectionio/blueprint/rss/single_watch.py (lines ~45 and ~50)`\n\nThe UUID parameter from the URL path is interpolated into the response body using an f-string with no escaping:\n\n### Line ~45\n```\nwatch = datastore.data['watching'].get(uuid)\nif not watch:\n return f\"Watch with UUID {uuid} not found\", 404 # ← No escaping, Content-Type: text/html\n```\n\n### Line ~50\n```\nif len(dates) < 2:\n return f\"Watch {uuid} does not have enough history snapshots...\", 400 # ← Same issue\nFlask's default Content-Type for plain string responses is text/html; charset=utf-8, so any HTML/JavaScript in {uuid} is rendered by the browser.\n```\n\n## Attack Vector\nThe attack requires a valid RSS access token, which is a 32-character hex string exposed in the HTML <link> tag on the homepage without authentication:\n\n<!-- Visible in page source of any unauthenticated instance -->\n<link rel=\"alternate\" type=\"application/rss+xml\" href=\"/rss?token=f2bb14e20ff01bad83a743cf21b5df95\">\n\nAttacker visits the target's homepage if it unauthenticathed and extracts the RSS token from the <link> tag\nCrafts a malicious URL:\n\n1. http://target:5000/rss/watch/%3Cimg%20src%3Dx%20onerror%3Dalert(document.cookie)%3E?token=EXTRACTED_TOKEN\n2. Sends the link to a victim who has an active session on the [changedetection.io](http://changedetection.io/) instance\n3. When the victim clicks the link, the server responds with:\n4. Watch with UUID not found\n\nThe browser renders the <img> tag, the onerror fires, and JavaScript executes in the victim's session context\n\n### PoC\nRequest:\n\n```\nGET /rss/watch/%3Cimg%20src%3Dx%20onerror%3Dalert(document.cookie)%3E?token=223e7edbbfee2268f5abb5344919054e HTTP/1.1\nHost: [127.0.0.1:5000](http://127.0.0.1:5000/)\n```\n\nResponse:\n\n```\nHTTP/1.1 404 NOT FOUND\nContent-Type: text/html; charset=utf-8\n```\n\nWatch with UUID not found\n\n\n<img width=\"1918\" height=\"1032\" alt=\"image\" src=\"https://github.com/user-attachments/assets/1633b167-e4ec-4705-a110-18fad7826fc9\" />\n\nThe XSS payload is reflected unescaped in an HTML response. The browser executes alert(document.cookie).\n\nLots of intances over internet affected to this.\n<img width=\"1465\" height=\"721\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f54160d4-abd1-4e8d-b845-f85e53e79325\" />\n\n\n### Impact\n- Session cookie theft via document.cookie exfiltration\n- Account takeover if session cookies lack HttpOnly flag\n- Phishing via crafted links that appear to originate from a trusted [changedetection.io](http://changedetection.io/) instance\n- Token is obtainable without authentication from the homepage <link> tag, lowering the barrier to exploitation\n\nchangedetection.io can work with developer teams to validate and address these issues. Please confirm receipt of this report and inform changedetection.io of the preferred timeline for coordinating the fix.\n\nRoberto Nunes",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "PyPI",
21+
"name": "changedetection.io"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "0.53.7"
32+
}
33+
]
34+
}
35+
],
36+
"database_specific": {
37+
"last_known_affected_version_range": "<= 0.53.6"
38+
}
39+
}
40+
],
41+
"references": [
42+
{
43+
"type": "WEB",
44+
"url": "https://github.com/dgtlmoon/changedetection.io/security/advisories/GHSA-mw8m-398g-h89w"
45+
},
46+
{
47+
"type": "ADVISORY",
48+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27645"
49+
},
50+
{
51+
"type": "WEB",
52+
"url": "https://github.com/dgtlmoon/changedetection.io/commit/a385c89abf44b52fcfa20c7c6a6dd3047c4c1eb5"
53+
},
54+
{
55+
"type": "PACKAGE",
56+
"url": "https://github.com/dgtlmoon/changedetection.io"
57+
}
58+
],
59+
"database_specific": {
60+
"cwe_ids": [
61+
"CWE-79"
62+
],
63+
"severity": "MODERATE",
64+
"github_reviewed": true,
65+
"github_reviewed_at": "2026-02-25T19:07:44Z",
66+
"nvd_published_at": "2026-02-25T05:17:26Z"
67+
}
68+
}

0 commit comments

Comments
 (0)