Zero day bug threatens many WordPress sites
TimThumb developer pwned by own creation
Attackers are exploiting a widely used extension for the WordPress publishing platform to take control of vulnerable websites, one of the victims has warned.
The vulnerability affects virtually all websites that have an image-resizing utility called TimThumb running with WordPress, Mark Maunder, CEO of Seattle-based Feedjit, wrote in a post published Monday. The extension is "inherently insecure" because it makes it easy for hackers to execute malicious code on websites that use it. At least two websites have already been compromised, he reported.
Maunder said he found the vulnerability after discovering his own website, markmaunder.com, was suddenly and inexplicably loading advertisements, even though the blog wasn't configured to do so.
After a thorough investigation, he learned that an attacker had used TimThumb to load a PHP file into one of his site directories and then execute it. The utility, he said, by default allows files to be remotely loaded and resized from blogger.com, wordpress.com, and five other websites and doesn't vet URLs for malicious strings, making it possible to upload malicious payloads.
"So if you create a file on a web server like so: http://blogger.com.somebadhackersite.com/badscript.php and tell timthumb.php to fetch it, it merrily fetches the file and puts it in the cache directory ready for execution," Maunder explained.
He went on to report the technique was used on Friday to hack Ben Gillbanks, developer of TimThumb. Gillbanks is working on a permanent fix, but in the meantime, Maunder has submitted a temporary patch that fixes the most obvious errors.
"I can’t apologise enough for this oversight in the code and hope nobody has anything too bad happen to their sites because of my error," Gillbanks wrote in a comment responding to Maunder's post. ®