How BitFire Stops CVE-2024-1981 WPvivid SQL Injection

Recherche de vulnérabilité WordPress

WPvivid exposed its staging workflow to unauthenticated requests and used the attacker-controlled table prefix in database statements, while BitFire blocks automated exploit requests, detects SQL injection, and protects sensitive database outcomes.

Unauthenticated Critical Severity Sensitive Data Exposure SQL Injection
BitFire · Avis de vulnérabilitéRecherche publiée
ConseilCVE-2024-1981
ComposantWPvivid — Backup, Migration & Staging
Source pertinenteincludes/staging/class-wpvivid-staging.php: WPvivid_Staging::load_ajax() and start_staging(); includes/staging/class-wpvivid-staging-copy-db-ex.php: staging SQL construction
Résumé exécutif

Ce que les administrateurs WordPress doivent savoir

CVE-2024-1981 is a critical unauthenticated SQL injection vulnerability identified in WPvivid Backup and Migration version 0.9.68. The plugin registered its staging-start and progress actions for visitors without WordPress accounts. A remote attacker could submit a crafted `table_prefix` POST parameter to the public staging action; vulnerable code stored that value as the new database prefix and later incorporated it into staging SQL statements without safe handling as an identifier. This could let the attacker alter database queries and potentially extract sensitive information. BitFire bot protection rejects unknown automated clients before the staging handler runs, BitFire WAF detects the SQL injection payload at the request boundary, and BitFire PRO RASP independently denies unauthorized sensitive-data access and administrator-account creation at runtime.

En un coup d'œil

Faits clés

  • The CVE record identifies WPvivid version 0.9.68 as affected
  • No WordPress account is required to call the vulnerable staging-start action
  • The attacker controls the `table_prefix` POST parameter sent to `wpvividstg_start_staging_free`
  • The staging process uses the supplied prefix when constructing database table names and SQL statements
  • BitFire bot protection and WAF stop automated delivery and SQL injection at separate request-layer checks
  • BitFire PRO RASP independently protects sensitive database reads and unauthorized administrator-account creation
01
Aperçu des vulnérabilités

Comprendre l'exposition

Le composant concerné, le chemin d’attaque et le risque pratique pour les sites Web WordPress.

Composant concernéWPvivid — Backup, Migration & Staging
Portée potentielle900,000+ installations
Technique d'attaqueSQL injection
Publié2024-02-28
BitFire stops the unknown automated request, rejects SQL syntax in `table_prefix`, and independently protects sensitive database outcomes if vulnerable code is reached.
02
Analyse technique

Comment fonctionne la vulnérabilité

Détails de la recherche, versions concernées, comportement d'exploitation et conseils de remédiation.

CVE-2024-1981 Exposes WPvivid's Staging Database Workflow

WPvivid provides backup, migration, restore, and staging features to approximately 900,000 WordPress installations. CVE-2024-1981 identifies version 0.9.68 as vulnerable and carries a critical CVSS score of 9.8. An attacker does not need a WordPress account or user interaction: a crafted POST to WordPress's public AJAX endpoint can start the staging process with an attacker-selected `table_prefix`. Because that prefix reaches database statements as SQL structure rather than a safely bound data value, an attacker may alter the intended queries and extract sensitive database information. The precise records exposed or changed depend on the payload and database privileges, so those are possible impacts rather than guaranteed compromise of every site record.

A Public AJAX Hook Carries table_prefix Into SQL

In WPvivid 0.9.68, `WPvivid_Staging::load_ajax()` registers both `wpvividstg_start_staging_free` and `wpvividstg_get_staging_progress_free` with WordPress's `wp_ajax_nopriv_` hooks. Those hooks deliberately dispatch requests from visitors who are not logged in. `start_staging()` reads `table_prefix` directly from `$_POST`, stores it as the staging task's `new_prefix`, and starts copying the site and its database. The database-copy component concatenates that prefix with table names and places the resulting identifiers into statements such as `CREATE TABLE`, `UPDATE`, `DROP TABLE`, and `RENAME TABLE`. Prepared placeholders are designed for data values, not arbitrary SQL identifiers; accepting a caller-selected prefix without a strict identifier allowlist lets SQL metacharacters change the resulting statement.

Version 0.9.69 Removes Unauthenticated Access to the Workflow

The research advisory identifies 0.9.69 as the fixed release, and an exact comparison of the WordPress.org 0.9.68 and 0.9.69 packages confirms the security-relevant change. Version 0.9.69 changes the active hook names from `wp_ajax_nopriv_wpvividstg_start_staging_free` and `wp_ajax_nopriv_wpvividstg_get_staging_progress_free` to their `wp_ajax_` equivalents. Removing the `_nopriv_` portion from each active registration makes WordPress dispatch those endpoints only for authenticated requests. The correction closes the exposed route rather than attempting to make hostile table-prefix syntax safe. The corrected-behavior excerpt presents that hook-name change directly as an abridged reconstruction instead of showing commented-out registrations.

BitFire Blocks Automated Delivery and the SQL Injection Payload

Exploitation requires an attacker-controlled POST containing staging parameters such as `action` and `table_prefix`. BitFire bot protection detects an unknown automated client or impersonated browser sending unknown GET or POST parameters and can reject it before WordPress routes the request to WPvivid. Independently, BitFire WAF analyzes the `table_prefix` value for SQL injection behavior, including malicious SQL syntax and evasion patterns. When that rule matches, the WAF denies the request before `start_staging()` stores the hostile prefix or the staging task assembles a database statement. These request controls are behavior-based and active before a CVE-specific signature exists; they do not claim to block legitimate explicitly allowed integrations.

BitFire PRO RASP Protects the Database Outcome

BitFire PRO RASP provides a separate runtime boundary for exploit paths that reach application code despite request filtering. Its database policies prevent unauthorized access to sensitive data and unauthorized creation of WordPress administrator accounts. If an injected staging query attempts either outcome, RASP follows execution to the protected database operation and denies it even though the plugin accepted and routed the request incorrectly. This outcome-based control does not replace SQL injection filtering and does not imply that every injected statement creates an administrator; it limits the high-impact results that a successful injection may pursue from any request vector.

Conclusion: Staging Operations Need Independent Access Controls

Administrators can verify the installed WPvivid release and review web, database, staging, and BitFire events for unexpected `wpvividstg_start_staging_free` requests, unusual table prefixes, or unrecognized staging tasks. CVE-2024-1981 demonstrates why site administrators need a security solution with built-in access controls and zero-day protection when a plugin exposes a privileged database workflow. BitFire's bot and SQLi controls can stop the malicious request before WPvivid runs, while BitFire PRO RASP independently protects sensitive reads and administrator creation at the operation where they must succeed—even before a vulnerability-specific response has been written.

03
Examen des sources

Code vulnérable et corrigé

La source pertinente se trouve dans includes/staging/class-wpvivid-staging.php: WPvivid_Staging::load_ajax() and start_staging(); includes/staging/class-wpvivid-staging-copy-db-ex.php: staging SQL construction.

AvantComportement vulnérable
// Vulnerable registration behavior, abridged from WPvivid 0.9.68.
public function load_ajax()
{
    add_action('wp_ajax_nopriv_wpvividstg_start_staging_free', array($this, 'start_staging'));
    add_action('wp_ajax_nopriv_wpvividstg_get_staging_progress_free', array($this, 'get_staging_progress'));
}
AprèsComportement corrigé
// Corrected registration behavior, abridged reconstruction.
public function load_ajax()
{
    add_action('wp_ajax_wpvividstg_start_staging_free', array($this, 'start_staging'));
    add_action('wp_ajax_wpvividstg_get_staging_progress_free', array($this, 'get_staging_progress'));
}
04
Protection « jour zéro »

Protection dès la première demande d'exploit

BitFire protège les serveurs WordPress dès le premier jour, avant qu'une vulnérabilité ne soit connue publiquement et avant que d'autres fournisseurs n'aient le temps de développer des signatures ou des correctifs.

01 · VérifierArrêtez les clients inconnus

Les contrôles des robots et la vérification du navigateur arrêtent les clients automatisés non fiables avant qu’un code d’exploitation jusqu’alors inconnu n’atteigne WordPress.

02 · DétecterBloquer les comportements malveillants

Les protections générales WAF identifient les comportements de requêtes dangereux et les charges utiles hostiles sans attendre une signature spécifique à la vulnérabilité.

03 · PrévenirContenir les attaques au moment de l'exécution

RASP suit l'exécution dans PHP et empêche les modifications non autorisées des fichiers, comptes et contenus de bases de données protégés.

BitFire · Protection WordPressPrêt pour le jour zéro
BitFire combine des contrôles de client vérifié, une détection WAF basée sur le comportement et une application RASP d'exécution pour protéger WordPress avant qu'un exploit n'ait un nom, un CVE, une signature ou un correctif de fournisseur.
À propos de l'auteur

Cory Marais

Cory a plus de 20 ans d'expérience en sécurité Internet et est l'un des principaux développeurs du projet BitFire.

Lire la recherche sur la sécurité BitFire →
Protégez votre site WordPress

Ajoutez une protection avant l’arrivée du prochain exploit.

BitFire combine les contrôles de robots, l'inspection des demandes, la détection des logiciels malveillants et la protection d'exécution dans une seule plateforme de sécurité WordPress.

Protéger mon site gratuitement â†'