CVE-2024-56509: Changedetection.io Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-j5vv-6wjg-cfr8
CVSS 8.6
CWE-200 CWE-22
Published
Advisory Summary

CVE-2024-56509 is a HIGH (CVSS 8.6) path traversal vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Changedetection.io libraries in the PyPI ecosystem. The issue involves changedetection.io vulnerable to improper input validation leading to lfr/path traversal. Remediation is available by upgrading affected packages to version 0.48.05.

CVE-2024-56509 at a Glance

CVE Identifier CVE-2024-56509
GHSA Identifier GHSA-j5vv-6wjg-cfr8
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Changedetection.io
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-56509

To remediate this vulnerability, upgrade all affected Changedetection.io dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

changedetection.io fixed: 0.48.05
pip install changedetection.io>=0.48.05
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show changedetection.io

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-56509, inspect your installed packages using pip:

pip show changedetection.io

Analyze the terminal output to locate any version of Changedetection.io in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.48.05), your application is affected.

Note: The pip show changedetection.io command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Changedetection.io, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 ![image](https://github.com/user-attachments/assets/55c34f2e-cafb-4a7a-a7ef-ec222e3f519b) ![image](https://github.com/user-attachments/assets/d41189f5-7bf2-48b5-9ce3-c26f79cefeda)

CVE-2024-56509 Affected Changedetection.io Versions

1 component(s)
Fixed Versions:
0.48.05
Product / Package Ecosystem Affected Versions Fixed Version
changedetection.io
PyPI
< 0.48.05
0.48.05

References

Frequently Asked Questions

What is CVE-2024-56509?
CVE-2024-56509 is a security vulnerability in Changedetection.io involving changedetection.io Vulnerable to Improper Input Validation Leading to LFR/Path Traversal under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Changedetection.io versions are affected?
Affected versions include releases prior to 0.48.05 across affected packages: changedetection.io.
What version fixes CVE-2024-56509?
Upgrading to 0.48.05 (or the latest patched release for your respective branch) resolves the vulnerability.
Is changedetection.io affected?
Yes, changedetection.io is affected in releases prior to 0.48.05. Upgrade your dependency to 0.48.05 or later.
What is the CVSS score of CVE-2024-56509?
CVE-2024-56509 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2024-56509?
CVE-2024-56509 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check PyPI dependencies for CVE-2024-56509?
Run the dependency tree command: 'pip show changedetection.io'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j5vv-6wjg-cfr8",
  "modified" : "2024-12-27T19:09:04Z",
  "published" : "2024-12-27T18:02:02Z",
  "aliases" : [ "CVE-2024-56509" ],
  "summary" : "changedetection.io Vulnerable to Improper Input Validation Leading to LFR/Path Traversal",
  "details" : "### Summary\nImproper 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.\n\n### Details\nThe check in this line of code is insufficient.\n```\nif re.search(r'^file:/', url.strip(), re.IGNORECASE):\n```\nThe attacker can still bypass this by using:\n-`file:../../../../etc/passwd`\n-`file: ///etc/passwd` (with space before /)\n\n### PoC\n- Open up a changedetection.io instance with a webdriver configured.\n- Create a new watch with `file:../../../../etc/passwd`.\n- Check the watch preview.\n- The contents of `/etc/passwd` should pop out.\n\n### Screenshots\n![image](https://github.com/user-attachments/assets/55c34f2e-cafb-4a7a-a7ef-ec222e3f519b)\n![image](https://github.com/user-attachments/assets/d41189f5-7bf2-48b5-9ce3-c26f79cefeda)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "changedetection.io"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.48.05"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/dgtlmoon/changedetection.io/security/advisories/GHSA-j5vv-6wjg-cfr8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-56509"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dgtlmoon/changedetection.io/commit/4419bc0e61d0b03c588bd573a3602bbcfd953671"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dgtlmoon/changedetection.io/commit/f7e9846c9b40a229813d19cdb66bf60fbe5e6a2a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dgtlmoon/changedetection.io"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-27T18:02:02Z",
    "nvd_published_at" : "2024-12-27T16:15:25Z"
  }
}