Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS1qNXZ2LTZ3amctY2ZyOM4ABCyQ
changedetection.io Vulnerable to Improper Input Validation Leading to LFR/Path Traversal
Summary
Improper input validation in the application can allow attackers to perform local file read (LFR) or path traversal attacks. These vulnerabilities occur when user input is used to construct file paths without adequate sanitization or validation. For example, using file:../../../etc/passwd
or file: ///etc/passwd
can bypass weak validations and allow unauthorized access to sensitive files. Even though this has been addressed in previous patch, it is still insufficient.
Details
The check in this line of code is insufficient.
if re.search(r'^file:/', url.strip(), re.IGNORECASE):
The attacker can still bypass this by using:
-file:../../../../etc/passwd
-file: ///etc/passwd
(with space before /)
PoC
- Open up a changedetection.io instance with a webdriver configured.
- Create a new watch with
file:../../../../etc/passwd
. - Check the watch preview.
- The contents of
/etc/passwd
should pop out.
Screenshots
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1qNXZ2LTZ3amctY2ZyOM4ABCyQ
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: 27 days ago
Updated: 27 days ago
CVSS Score: 8.6
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
EPSS Percentage: 0.00044
EPSS Percentile: 0.12544
Identifiers: GHSA-j5vv-6wjg-cfr8, CVE-2024-56509
References:
- https://github.com/dgtlmoon/changedetection.io/security/advisories/GHSA-j5vv-6wjg-cfr8
- https://github.com/dgtlmoon/changedetection.io/commit/4419bc0e61d0b03c588bd573a3602bbcfd953671
- https://github.com/dgtlmoon/changedetection.io/commit/f7e9846c9b40a229813d19cdb66bf60fbe5e6a2a
- https://nvd.nist.gov/vuln/detail/CVE-2024-56509
- https://github.com/advisories/GHSA-j5vv-6wjg-cfr8
Blast Radius: 1.0
Affected Packages
pypi:changedetection.io
Dependent packages: 0Dependent repositories: 0
Downloads: 8,699 last month
Affected Version Ranges: < 0.48.05
Fixed in: 0.48.05
All affected versions: 0.38.2, 0.39.1, 0.39.2, 0.39.3, 0.39.4, 0.39.5, 0.39.6, 0.39.7, 0.39.8, 0.39.9, 0.39.10, 0.39.11, 0.39.12, 0.39.13, 0.39.14, 0.39.15, 0.39.16, 0.39.17, 0.39.18, 0.39.19, 0.39.20, 0.39.21, 0.39.22, 0.40.0, 0.40.2, 0.40.3, 0.41.1, 0.42.1, 0.42.2, 0.42.3, 0.43.1, 0.43.2, 0.44.1, 0.45.1, 0.45.2, 0.45.3, 0.45.4, 0.45.5, 0.45.6, 0.45.7, 0.45.8, 0.45.9, 0.45.11, 0.45.12, 0.45.13, 0.45.14, 0.45.15, 0.45.16, 0.45.17, 0.45.18, 0.45.19, 0.45.20, 0.45.21, 0.45.22, 0.45.23, 0.45.24, 0.45.25, 0.45.26, 0.46.0, 0.46.1, 0.46.2, 0.46.3, 0.46.4, 0.47.0, 0.47.1, 0.47.2, 0.47.3, 0.47.4, 0.47.5, 0.47.6, 0.48.0, 0.48.1, 0.48.2, 0.48.3, 0.48.4
All unaffected versions: 0.48.5, 0.48.6