nDarkness Logo
  • Home
  • Forums
21 Oct 2009

WordPress – DM Albums Version 2.0 Critical Vulnerability



The latest version of DM Albums was released on 10/21/2009 to all WordPress users and it contains a serious flaw that can allow an attacker to remotely delete any file or folder they wish. The author has been notified of the problem and I have listed a work around below to prevent directory traversal.

After upgrading to the latest version of DM Albums I was playing with the new features and noticed the function to delete albums. I dug into the code located at wp-content/plugins/dm-albums/wp-dm-albums-ajax.php and found that there is no check to see if someone has used directory traversal. This means that anyone can delete files or directories outside of the upload directory.

Example:

    http://someblogsite/wp-content/plugins/dm-albums/wp-dm-albums-ajax.php?delete_album=../../../public_html

The vulnerable section that allows this to take place is:

    if(isset($_GET["delete_album"]) && !empty($_GET["delete_album"]) && strlen($_GET["delete_album"]) > 0)
    {
    //delete the album directory
    dm_get_album_delete($DM_UPLOAD_DIRECTORY . $_GET["delete_album"]);
    }

In this code there is no check to see what is contained in the GET variable and you don’t even need to be logged in to delete files.

Below is a quick and dirty work around to prevent the problem and I would suspect there will be more checks to ensure that user input is sanitized in the near future. This work around will not prevent malicious users from deleting your albums but it will keep folders outside of the upload directory safe.

    if(isset($_GET["delete_album"]) && !empty($_GET["delete_album"]) && strlen($_GET["delete_album"]) > 0)
    {
    //remove the / character from user input
    $_GET["delete_album"] = str_replace(“/”, “”, $_GET["delete_album"]);

    //delete the album directory
    dm_get_album_delete($DM_UPLOAD_DIRECTORY . $_GET["delete_album"]);
    }

Once I hear back from the author I will update this post to let everyone know the outcome.

Update: A new release, v2.0.1, with the above mentioned work around has been released. We should also expect to see another update in the next few days that will employ more security checks and some upgrades for WordPress multi user environments as well.

GHTime Code(s): dc678 16e08 522fd 08095 nc 68ef8 
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Tags: DM-Albums, Exploit, Hacking, Software, Vulnerability, WordPress

This entry was posted on Wednesday, October 21st, 2009 at 10:49 pm and is filed under Computer Security, Privacy. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

Click here to cancel reply.

CAPTCHA Image CAPTCHA Audio
Refresh Image
« Sprint and Their Poor Customer Service – A Case Study
Microsoft Exchange Recovery Mode and How to Fix it »
  • nDarkness Recent Posts

    • Mac OS X – Update PHP, MySQL and Easily Add GD Support
    • Facebook’s Privacy Troubles on the Horizon
    • Should MySpace Be Put Out to Pasture?
    • WordPress Sites Hacked in Bulk
    • Intuit QuickBooks Discount Error Goes Unfixed
    • DM-FileManager 3.9.9 XSS Vulnerability
    • DM-FileManager 3.9.6 Cookie Injection and Authorization Bypass Vulnerability
    • Windows XP Roaming Profile Synchronization Issues
    • Windows XP – Reclaim Lost Hard Drive Space
    • Linux System Update Script
  • Sponsors


  • Recent Comments

    • Jacob on Facebook’s Privacy Troubles on the Horizon
    • Sid on Intuit QuickBooks Discount Error Goes Unfixed
    • safety on Intuit QuickBooks Discount Error Goes Unfixed
    • sid on Intuit QuickBooks Discount Error Goes Unfixed
    • safety on Intuit QuickBooks Discount Error Goes Unfixed
    • rafalbo on Intuit QuickBooks Discount Error Goes Unfixed
    • safety on Should MySpace Be Put Out to Pasture?
    • wclax04 on Should MySpace Be Put Out to Pasture?
    • safety on Intuit QuickBooks Discount Error Goes Unfixed
    • kgermino on Intuit QuickBooks Discount Error Goes Unfixed
  • User Recent Posts

    • Mandi has posted - Teaching My Baby Sign Language
    • Mandi has posted - Weekend Fun and CJ's Birthday
    • Mandi has posted - The Do's and Don'ts of Tipping
    • Mandi has posted - First Words
    • Cassey has posted - My New Toy
  • Categories

    • Account information (1)
    • Computer Security (6)
    • Linux (3)
    • Mac OS X (5)
    • Privacy (6)
    • Social Networking (2)
    • Software (4)
    • Uncategorized (1)
    • Utilities (4)
    • Windows (6)
  • Archives

    • May 2010 (5)
    • January 2010 (1)
    • December 2009 (1)
    • November 2009 (4)
    • October 2009 (6)
  • Site Links

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Tags

    Cookie Injection DM-Albums DM-FileManager Error Exchange Exploit Facebook Flash Flash Cookies Hacking Intuit Linux Mac MacBook MacBook Pro MySpace MySQL OS X PHP Privacy QuickBooks Service Slackware Social Networking Software Sprint Ubuntu Vulnerability Windows WordPress XP XSS
nDarkness is proudly powered by WordPress
Entries (RSS) and Comments (RSS).
Privacy Policy