# Second-Order SQL Injection in All-in-One WP Migration and Backup Plugin (CVE-2026-19949) Exposes 5M+ WordPress Sites to Takeover

> A second-order SQL injection vulnerability (CVE-2026-19949, CVSS 3.1 8.8) in ServMask's All-in-One WP Migration and Backup WordPress plugin lets an attacker plant a malicious backslash/quote payload via a trackback that later corrupts a SQL query during archive-restore database rewriting, exposing the plugin's ai1wm_secret_key and enabling import of a malicious backup archive to achieve full site takeover. All versions through 7.109 are affected; ServMask patched in 7.110 on 2026-08-20, but roughly 65% of the plugin's 5+ million active installs remained unpatched as of public disclosure.

- **Published:** 2026-09-02T00:00:00Z
- **Last reviewed:** 2026-09-02T00:00:00Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-2301
- **Card image:** https://intel.threadlinqs.com/og/threat/threat-intel-wp-trackback-sql-injection-tl-2026-2301.webp?v=9171a3a7 (Threadlinqs threat intel: CVE-2026-19949 WP Migration Plugin SQLi: Detection & IOCs (TL-2026-2301) — High severity, 11 IOCs, 9 detection rules.)
- **ID:** TL-2026-2301
- **Severity:** HIGH (CVSS 8.8)
- **Category:** VULNERABILITY
- **Status:** ACTIVE
- **Detections:** 9 (1 shown free below) · **IOCs:** 11
- **CVEs:** CVE-2026-19949

## Description

All-in-One WP Migration and Backup, a WordPress plugin from ServMask with more than 5 million active installations, contains a second-order SQL injection vulnerability tracked as CVE-2026-19949 (CVSS 3.1 base score 8.8, CWE-89) affecting all versions up to and including 7.109. The root cause is incorrect parsing of escaped backslashes and quotation marks while the plugin rewrites database content during archive restoration; NVD's advisory describes it as 'insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query.' The flawed logic spans multiple files in the plugin's import pipeline, including the import controller (class-ai1wm-import-controller.php), the main controller (class-ai1wm-main-controller.php), the import database model (class-ai1wm-import-database.php), and the vendored database class (class-ai1wm-database.php), where SQL statements are built through string concatenation rather than parameterized queries.

The exploit chain is a classic second-order injection: an attacker submits crafted, specially-escaped data through WordPress's trackback/pingback mechanism, which is stored inertly (e.g., in wp_comments) without immediately triggering the flaw. When a site administrator later exports the site and then imports/restores a .wpress archive, the plugin rewrites database content and re-parses the previously stored, improperly-escaped payload, breaking out of the intended SQL query context. This second-order injection can be used to extract the plugin's secret import key (referred to across advisories as the ai1wm_secret_key), which the plugin normally uses to authorize archive imports. With that key exposed, an attacker can submit a malicious .wpress archive containing executable PHP code through the plugin's import endpoint, effectively backdooring the site and achieving full remote code execution and site takeover.

The issue was discovered by security researcher Jack Taylor and reported to Wordfence (Defiant) in mid-August 2026; Wordfence validated the finding and disclosed it to ServMask, who shipped a fix in version 7.110 on 2026-08-20. CVE-2026-19949 was published in NVD on 2026-08-25 (CWE-89, CVSS vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H), alongside a GitHub Security Advisory (GHSA-wgw6-99h6-924c) and a Patchstack database entry that both label the exploitation path 'Unauthenticated Second-Order SQL Injection via Archive Restore to Remote Code Execution' -- the 'unauthenticated' framing reflects that the initial payload-planting step via trackback requires no credentials, even though NVD's CVSS vector records PR:L for the privilege context of the account that ultimately triggers the vulnerable restore action. BleepingComputer's 2026-09-02 report, which seeded this investigation, notes that despite the ten-day-old patch, roughly 65% of the plugin's 5+ million active WordPress.org installations (approximately 3.25 million sites) remained on vulnerable versions at time of publication.

No public proof-of-concept exploit code and no confirmed in-the-wild exploitation have been reported by any source reviewed (BleepingComputer, SentinelOne, Wordfence, Patchstack, WPScan); the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Risk is therefore driven by the scale of exposure and the severity of the takeover impact rather than confirmed active attacks, but the level of technical detail already published (exact vulnerable file/line locations, the trackback injection vector, and the secret-key exposure mechanism) substantially lowers the bar for a working exploit to be developed.

## MITRE ATT&CK

- T1595.002 Active Scanning: Vulnerability Scanning
- T1588.005 Obtain Capabilities: Exploits
- T1190 Exploit Public-Facing Application
- T1059 Command and Scripting Interpreter
- T1505.003 Server Software Component: Web Shell
- T1550 Use Alternate Authentication Material
- T1552 Unsecured Credentials
- T1213 Data from Information Repositories
- T1565.001 Data Manipulation: Stored Data Manipulation

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**AIOWM Malicious .wpress Archive Import Correlated with New PHP File Drop (CVE-2026-19949)** (`TL-2026-2301-SPL-002`)

Detects an All-in-One WP Migration and Backup import/restore request (admin-ajax.php action=ai1wm_import) followed by a new or modified PHP file appearing in the WordPress uploads or ai1wm-backups directory — the post-exploitation step where the second-order SQL injection has exposed ai1wm_secret_key and the attacker imports a malicious .wpress archive containing an executable web shell to achieve RCE and site takeover.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1565.001, T1505.003, T1059
- **Data sources:** apache_access_log, azure_appservice_http_logs, microsoft_defender_for_endpoint_devicefileevents, file_integrity_monitoring
- **Severity:** critical
- **Confidence:** high

### Splunk SPL

```spl
index=web sourcetype=access_combined uri_path="/wp-admin/admin-ajax.php"
| eval decoded=urldecode(http_content)
| search decoded="*action=ai1wm_import*" OR decoded="*ai1wm_secret_key*" OR decoded="*ai1wm_import_blogs*"
| stats count as import_hits, min(_time) as import_first_seen, max(_time) as import_last_seen, values(status) as statuses by src_ip, http_user_agent
| appendcols
    [ search index=fim sourcetype="file:notify" (action=created OR action=modified) (file_path="*wp-content/uploads*.php" OR file_path="*ai1wm-backups*.php")
      | stats count as drop_hits, min(_time) as drop_first_seen, max(_time) as drop_last_seen, values(file_path) as dropped_files by host ]
| where import_hits > 0 AND drop_hits > 0 AND (drop_first_seen - import_first_seen) < 900
| table src_ip, import_hits, drop_hits, dropped_files, import_first_seen, drop_first_seen
```

### Microsoft KQL

```kql
AppServiceHTTPLogs
| where TimeGenerated > ago(24h)
| where CsUriStem has "admin-ajax.php"
| where CsUriQuery has_any ("action=ai1wm_import", "ai1wm_secret_key", "ai1wm_import_blogs")
| extend EventType = "ai1wm_import_request", Detail = CsUriQuery
| project TimeGenerated, Actor = CIp, Detail, EventType
| union (
    DeviceFileEvents
    | where Timestamp > ago(24h)
    | where FolderPath has_any ("wp-content/uploads", "ai1wm-backups")
    | where FileName endswith ".php"
    | where ActionType in ("FileCreated", "FileModified")
    | where InitiatingProcessFileName in~ ("php-cgi.exe", "php.exe", "httpd.exe", "w3wp.exe", "nginx.exe")
    | extend EventType = "webshell_file_drop", Detail = FileName, TimeGenerated = Timestamp, Actor = DeviceName
    | project TimeGenerated, Actor, Detail, EventType
  )
| sort by TimeGenerated asc
```

### Sigma

```yaml
title: Malicious .wpress Archive Import and Webshell File Drop via All-in-One WP Migration (CVE-2026-19949)
id: 7f3d9e2a-4b1c-4f6d-9a8e-1c2d3e4f5062
status: experimental
description: Detects a PHP file being created or modified inside WordPress upload/backup directories, consistent with post-exploitation web shell deployment after an All-in-One WP Migration and Backup archive import that follows second-order SQL injection exposure of ai1wm_secret_key (CVE-2026-19949).
references:
  - https://nvd.nist.gov/vuln/detail/CVE-2026-19949
  - https://github.com/advisories/GHSA-wgw6-99h6-924c
author: Threadlinqs Team
date: 2026-09-02
tags:
  - attack.persistence
  - attack.t1505.003
  - attack.execution
  - attack.t1059
  - attack.impact
  - attack.t1565.001
  - cve.2026.19949
logsource:
  category: file_event
  product: linux
detection:
  selection_path:
    TargetFilename|contains:
      - 'wp-content/uploads'
      - 'ai1wm-backups'
  selection_ext:
    TargetFilename|endswith: '.php'
  filter_known_good:
    TargetFilename|endswith:
      - '/index.php'
  condition: selection_path and selection_ext and not filter_known_good
falsepositives:
  - Legitimate plugin/theme installation writing PHP files to uploads (rare; the uploads directory should not normally execute PHP)
  - Authorized site migration performed by a verified administrator using a known-good archive
level: critical
```

**Known false positives:**

- A verified administrator performing a legitimate, scheduled site migration or restore from a trusted, hash-verified .wpress archive
- Plugin/theme updates that legitimately drop PHP into non-standard upload subdirectories

**Tuning notes:** Tighten the 900-second correlation window to match observed restore-to-write latency in your environment; exclude wp-content/uploads/ai1wm-backups/*.wpress (the archive itself, not a PHP payload) and any file path matching a documented, scheduled maintenance-window migration.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- WordPress Trackback/XML-RPC SQL Injection Payload Planting Against AIOWM (CVE-2026-19949) (locked: unlock with TL Creds)
- AIOWM Malicious .wpress Archive Import Correlated with New PHP File Drop (CVE-2026-19949) (locked: unlock with TL Creds)
- Stolen ai1wm_secret_key Reuse Across Multiple Source IPs (CVE-2026-19949) (locked: unlock with TL Creds)
- WordPress Trackback/XML-RPC SQL Injection Payload Planting Against AIOWM (CVE-2026-19949) (locked: unlock with TL Creds)
- AIOWM Malicious .wpress Archive Import Correlated with New PHP File Drop (CVE-2026-19949) (locked: unlock with TL Creds)
- Stolen ai1wm_secret_key Reuse Across Multiple Source IPs (CVE-2026-19949) (locked: unlock with TL Creds)
- WordPress Trackback/XML-RPC SQL Injection Payload Planting Against AIOWM (CVE-2026-19949) (locked: unlock with TL Creds)
- Stolen ai1wm_secret_key Reuse Across Multiple Source IPs (CVE-2026-19949) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sources

- [WordPress Backup Plugin Flaw Exposes Millions of Sites to Takeover Attacks](https://www.bleepingcomputer.com/news/security/wordpress-backup-plugin-flaw-exposes-millions-of-sites-to-takeover-attacks/)
- [NVD - CVE-2026-19949 Detail](https://nvd.nist.gov/vuln/detail/CVE-2026-19949)
- [Wordfence Threat Intelligence - All-in-One WP Migration and Backup SQL Injection](https://www.wordfence.com/threat-intel/vulnerabilities/id/22e273d9-a268-4dc5-b1f6-3bc5c29232c5)
- [Patchstack - WordPress All-in-One WP Migration and Backup Plugin <= 7.109 Unauthenticated Second-Order SQL Injection via Archive Restore to RCE](https://patchstack.com/database/wordpress/plugin/all-in-one-wp-migration/vulnerability/wordpress-all-in-one-wp-migration-and-backup-plugin-7-109-unauthenticated-second-order-sql-injection-via-archive-restore-to-remote-code-execution-vulnerability)
- [SentinelOne Vulnerability Database - CVE-2026-19949](https://www.sentinelone.com/vulnerability-database/cve-2026-19949/)
- [FreshySites Security Bulletin - All-in-One WP Migration and Backup Plugin Vulnerability CVE-2026-19949](https://freshysites.com/security-bulletins/all-in-one-wp-migration-and-backup-plugin-vulnerability-cve-2026-19949/)
- [WPScan - All-in-One WP Migration and Backup WordPress Plugin Security Advisories](https://wpscan.com/plugin/all-in-one-wp-migration/)
- [All-in-One WP Migration and Backup - WordPress.org Plugin Page](https://wordpress.org/plugins/all-in-one-wp-migration/)
- [GitHub Security Advisory GHSA-wgw6-99h6-924c - All-in-One WP Migration and Backup SQL Injection](https://github.com/advisories/GHSA-wgw6-99h6-924c)
- [ServMask All-in-One WP Migration and Backup v7.109 source (vulnerable code paths, WordPress.org SVN)](https://plugins.trac.wordpress.org/browser/all-in-one-wp-migration/tags/7.109/lib/vendor/servmask/database/class-ai1wm-database.php)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-2301
