Millions of WordPress sites around the world were at risk from a pair of related file deletion vulnerabilities that potentially could have enabled an attacker to delete arbitrary files.
A new version of open-source content management system WordPress, 4.9.7, was released on July 5 that patches a pair of security vulnerabilities that could expose WordPress sites to risk.
Both security vulnerabilities are arbitrary file deletion issues. Researchers at RIPS Tech publicly reported the first issue on June 26, while WordPress security firm Wordfence discovered the second flaw on July 2. In addition to the two vulnerabilities, WordPress 4.9.7 provides fixes for 17 other bugs to improve stability.
"WordPress versions 4.9.6 and earlier are affected by a media issue that could potentially allow a user with certain capabilities to attempt to delete files outside the uploads directory," WordPress warned in an advisory.
WordPress is one of the most widely deployed content management systems on the internet, powering upward of 75 million websites. The new update follows the WordPress 4.9.6 milestone that was released on May 17, which provided users with privacy enhancements to help meet the European Union’s General Data Protection Regulation (GDPR) rules.
The fixed file deletion vulnerabilities are particularly impactful, according to the security researchers who first discovered the flaws.
"Exploiting the vulnerability grants an attacker the capability to delete any file of the WordPress installation (+ any other file on the server on which the PHP process user has the proper permissions to delete)," RIPS Tech wrote in a blog post. "Besides the possibility of erasing the whole WordPress installation, which can have disastrous consequences if no current backup is available, an attacker can make use of the capability of arbitrary file deletion to circumvent some security measures and to execute arbitrary code on the webserver."
After reading the RIPS Tech disclosure, Wordfence lead developer Matt Barry built a remediation for Wordfence customers and in the process discovered a second related issue.
"Similar to the first arbitrary file deletion vulnerability, when an author deletes this attachment, the wp-config.php is deleted allowing the author to go through the initial WordPress installation process which allows them to fully compromise the site," wrote in a blog post.
For the millions of WordPress sites that are impacted by the file deletion vulnerabilities, updates are largely being done automatically. For minor releases, like 4.9.7, WordPress has an automatic system for updating sites without any user intervention.
WordPress developers had not originally planned to have the 4.9.7 update be a security and bug fix release. The original plan was for version 4.9.7 to introduce the new Gutenberg interface feature that will become a foundation for the WordPress 5.0 series.
The Gutenberg interface preview effort has now been reset for the WordPress 4.9.8 release that is scheduled to become generally available on July 31.
Sean Michael Kerner is a senior editor at eWEEK and InternetNews.com. Follow him on Twitter @TechJournalist.