ghsa-j5vv-6wjg-cfr8
Vulnerability from github
Published
2024-12-27 18:02
Modified
2024-12-27 19:09
Summary
changedetection.io Vulnerable to Improper Input Validation Leading to LFR/Path Traversal
Details

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 image

Show details on source website


{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "changedetection.io"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.48.05"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2024-56509"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-200",
      "CWE-22"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2024-12-27T18:02:02Z",
    "nvd_published_at": "2024-12-27T16:15:25Z",
    "severity": "HIGH"
  },
  "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\u0027^file:/\u0027, 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)",
  "id": "GHSA-j5vv-6wjg-cfr8",
  "modified": "2024-12-27T19:09:04Z",
  "published": "2024-12-27T18:02:02Z",
  "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"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "changedetection.io Vulnerable to Improper Input Validation Leading to LFR/Path Traversal"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.