Critical remote code execution (RCE) vulnerabilities have been found in two popular WordPress plugins.
The affected plugins, Backup Migration and Elementor, have a combined user base of more than five million.
Elementor is the most popular of the two, with more than five million active installations. A website builder plugin, it helps administrators quickly create sites without writing a single line of code.
The plugin was recently found to be affected by an authenticated arbitrary file upload defect that allows an attacker with edit post permissions to upload arbitrary files and achieve RCE.
The issue was identified in a function that saves files to the temp directory, which performs no check on the file name, thus allowing an attacker to “supply a path traversal payload with a .php filename” that will be saved directly to the main directory.
“The interesting part is that the check on the allowed file extensions using the validate_file function is only performed after the file has already been uploaded,” WordPress security company Patchstack says.
The issue was identified in Elementor version 3.17.3 and an incomplete patch was included in version 3.18.1. On Friday, Elementor version 3.18.2 was released with a complete fix.
Backup Migration, a plugin for creating site backups and restoring them, has more than 90,000 active installations.
A vulnerability, tracked as CVE-2023-6553 (CVSS score of 9.8), was identified in the /includes/backup-heart.php file that the plugin uses, the Wordfence team at WordPress security firm Defiant explains.
Because an attacker can control the values passed to the include, the attacker could achieve RCE on the server, without authentication.
“By submitting a specially-crafted request, threat-actors can leverage this issue to include arbitrary, malicious PHP code and execute arbitrary commands on the underlying server in the security context of the WordPress instance,” Defiant notes.
The security defect impacts Backup Migration versions 1.3.7 and earlier and was addressed with the release of versions 1.3.8. Based on WordPress statistics, millions of websites are running outdated versions of the two plugins.
Site owners, administrators, and developers are advised to update to the latest versions of Elementor and Backup Migration as soon as possible. There is no mention of any of these flaws being exploited in attacks, but unpatched vulnerabilities in WordPress plugins are often leveraged by threat actors.