Skip to content

Stored XSS in Watch update via API

Low
dgtlmoon published GHSA-4c3j-3h7v-22q9 Nov 10, 2025

Package

pip changedetection.io (pip)

Affected versions

<=0.50.33

Patched versions

0.50.34

Description

Summary

A Stored Cross Site Scripting is present in changedetection.io Watch update API due to unsufficient security checks.

Details

Tested on changedetection.io version v0.50.24

REPOSITORY                            TAG       IMAGE ID       CREATED        SIZE
ghcr.io/dgtlmoon/changedetection.io   latest    0367276509a0   23 hours ago   599MB

When a user tries to add an unsafe URL as a Watch in the changedetection.io UI, the action is blocked with the error message "Watch protocol is not permitted by SAFE_PROTOCOL_REGEX or incorrect URL format".
This is catched by the function validate_url(test_url).

def validate_url(test_url):
    # ...
    from .model.Watch import is_safe_url
    if not is_safe_url(test_url):
        # This should be wtforms.validators.
        raise ValidationError('Watch protocol is not permitted by SAFE_PROTOCOL_REGEX or incorrect URL format')

When instead the Watch API is used, this check is not performed resulting in unsafe URLs added as Watch.

PoC

Update an existing watch with an unsafe URL

curl -X PUT "http://example.site/api/v1/watch/1242e1c5-d59e-4352-0078-203a55b21282" \
  -H "x-api-key: XXX" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "javascript:alert(document.domain)",
    "title": "XSS PoC",
    "paused": false
  }'

Impact

Two scenarios are possibile:

  1. An attacker can insert a new watch with an arbitrary URL which really points to a web page. Once the HTML content is retrieved, the attacker updates the URL with a JavaScript payload.
  2. An attacker substitutes the URL in an existing watch with a new URL that is in reality a JavaScript payload.

When the user clicks on Preview and then on the malicious link, the JavaScript malicious code is executed.

poc1
poc2

Credits

Edoardo Ottavianelli @edoardottt

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:N

CVE ID

CVE-2025-62780

Weaknesses

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. Learn more on MITRE.

Credits