WARNING: Zero Day Vulnerability Found on Timthumb.php

WARNING: Zero Day Vulnerability Found on Timthumb.php

3 Aug 2011 ·

Tips and Tricks, WordPress


TimThumb Zero Day Vulnerability

A zero day vulnerability has been recently found on TimThumb, a popular image resizing utility widely used in a lot of WordPress themes. This issue was first discovered and reported by Mark Maunder after his blog got hacked via the timthumb.php file/script.

The TimThumb zero day vulnerability allows malicious users, hackers and other third parties to upload and run PHP code in the timthumb cache directory. When the uploaded PHP code is run and executed, the attacker can do whatever they want with the affected site or blog.

Recommended measures:

If You Use TimThumb
If your current WordPress theme is using timthumb.php, make sure that you update to the latest version of TimThumb and to reglularly check on the official TimThumb site for updates and announcements.

Aside from updating the TimThumb file there’s another thing you need to do. Open up the timthumb.php or thumb.php file with a text editor and look for this line ALLOW_EXTERNAL and make sure that the value is set to FALSE.

define ('ALLOW_EXTERNAL', FALSE);


Once ALLOW_EXTERNAL is set to FALSE, next thing to do is remove the domains inside the $allowedSites array to ensure that remote file downloading is disabled:

Before

$allowedSites = array (
	'flickr.com',
	'picasa.com',
	'img.youtube.com',
);


After

$allowedSites = array ();


If You Do Not Use TimThumb
If you don’t use or need timthumb.php but have other WordPress themes stored in your wp-content/themes folder that uses timthumb.php, it is recommended that the timthumb.php or thumb.php file or even the entire theme or plugin folder be deleted/removed from your web server.

The theme I’m using here on JaypeeOnline – FreshNews by WooThemes uses TimThumb. After reading about this vulnerability, I immediately removed the thumb.php file and replaced it with an updated one. I was worried that I was using a very old version of TimThumb and that upgrading might mess up my blog but after the upgrade, I checked all the thumbnails and everything seems to be working fine. I also removed everything related to the old version of TimThumb and cleared the the cache.

If you want to know more about the TimThumb zero day vulnerability, how it was discovered and other additional info, check out Mark Maunder’s blog post.


Subscribe to JaypeeOnline's RSS feed  Share this on del.icio.us  Stumble It!  Digg this!  Share this on Facebook  Tweet this!  Share on FriendFeed  Bookmark It!  Submit to Reddit!  Email this story to a friend!
Written by Jaypee Habaradas
Owner and editor of JaypeeOnline. Self-proclaimed geek. New media writer and consultant. WordPress advocate. Loves blogging, gadgets, video games and sports. You can follow him on Twitter @jaypee or Facebook.
Don't miss a single post and receive FREE updates on your email inbox. Subscribe NOW!

Enter your email address:

*Don't forget to verify your subscription by clicking the link on the email that Feedburner will send you.*

Didn't find what you're looking for? Try looking for it again.

Related Posts

Related Ads

























, , , , , , , ,

**Comments posted on JaypeeOnline are moderated. I reserve the right to edit/delete comments that contain words or phrases that are defamatory, abusive, incite hatred and advertise an email address, commercial services or spammy.


7 Responses to “WARNING: Zero Day Vulnerability Found on Timthumb.php”

  1. Jayr PHILIPPINES Google Chrome Windows Says:

    I already encountered this timthumb on my client’s wordpress website.

    Reply

  2. Sourish @ Iphone 4 jailbreak INDIA Mozilla Firefox Windows Says:

    thanks for the update , im upgrading now .

    Reply

  3. John Garrett UNITED STATES Safari Mac OS Says:

    Holy Hannah! My theme actually does use TimbThumb so I’m off to update it right now. Good looking out man!

    Reply

  4. jehzlau AUSTRALIA Google Chrome Windows Says:

    Good thing I don’t use timthumb. :)

    Reply

Don't Be Shy. Share your thoughts!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

You May Also Like -

Deans FCKEditor with PWWANGS Code for WordPress(version 1.0.0) Security VulnerabilityDeans FCKEditor with PWWANGS Code for WordPress(version 1.0.0) Security VulnerabilityWeb security company Sucuri recently released a security alert concerning a WordPress plugin called ...