Skip to main content
Vulnerability Database/CVE-2025-11972

CVE-2025-11972: WordPress AI Autotagger SQL Injection Flaw

CVE-2025-11972 is an SQL injection vulnerability in the Tag, Category, and Taxonomy Manager AI Autotagger plugin for WordPress affecting versions up to 3.40.0. This article covers technical details, impact analysis, and mitigation strategies.

Published:

CVE-2025-11972 Overview

CVE-2025-11972 is a SQL Injection vulnerability in the Tag, Category, and Taxonomy Manager – AI Autotagger with OpenAI plugin (TaxoPress) for WordPress. The flaw affects all versions up to and including 3.40.0. It stems from insufficient escaping of the post_types parameter and lack of proper query preparation in database calls. Authenticated attackers with Editor-level access or higher can append additional SQL statements to existing queries. The injected queries can extract sensitive information from the WordPress database. The vulnerability is classified under CWE-89 (Improper Neutralization of Special Elements used in an SQL Command).

Critical Impact

Authenticated attackers holding Editor privileges or above can exfiltrate arbitrary data from the WordPress database through crafted post_types values.

Affected Products

  • TaxoPress – AI Autotagger with OpenAI plugin for WordPress, versions ≤ 3.40.0
  • Also distributed as the simple-tags WordPress plugin
  • WordPress sites running the vulnerable plugin with Editor or higher user accounts

Discovery Timeline

  • 2025-11-08 - CVE-2025-11972 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-11972

Vulnerability Analysis

The vulnerability resides in the plugin's AJAX handling code within inc/ajax-request.php. The post_types parameter is accepted from POST input and concatenated directly into raw SQL queries executed via $wpdb->get_results(). Because the array elements are inserted using implode("', '", $post_types) without escaping or preparation, attacker-controlled values break out of the intended string context. The impact is limited to confidentiality: an attacker can read sensitive data such as user credentials, session tokens, and configuration values stored in the database, but the CVSS scope does not grant integrity or availability impact. Exploitation requires Editor-level access, which reduces the attack surface but remains realistic in multi-author WordPress deployments.

Root Cause

The root cause is direct interpolation of an untrusted array into a SQL IN() clause without using $wpdb->prepare() placeholders. The plugin also failed to normalize the array elements with WordPress helpers such as sanitize_key(). The autoterm settings sink in inc/autoterms-functions.php similarly stored post_types and post_status values without type-specific sanitization, allowing tainted values to reach the query.

Attack Vector

An authenticated user with Editor or higher role submits a crafted AJAX request that includes malicious payloads in the post_types array parameter. The payload closes the quoted string context inside the IN() clause and appends a UNION SELECT or similar construct to exfiltrate data from other tables such as wp_users or wp_options.

php
// Vulnerable pattern (pre-patch) in inc/ajax-request.php
$objects = (array) $wpdb->get_results(
    "SELECT ID, post_title, post_content FROM {$wpdb->posts} 
     WHERE post_type IN ('" . implode("', '", $post_types) . "') 
     AND post_status IN ('" . implode("', '", $post_status) . "') 
     {$limit_days_sql} ORDER BY ID DESC LIMIT {$limit} OFFSET {$offset_start_from}"
);
// $post_types is attacker-controlled and inserted without escaping or prepare()

Source: TaxoPress GitHub Commit fd35042

Detection Methods for CVE-2025-11972

Indicators of Compromise

  • POST requests to admin-ajax.php containing post_types[] values with SQL metacharacters such as single quotes, UNION, SELECT, or comment sequences (--, #).
  • Unusually long or encoded post_types parameter values in web server access logs.
  • Database error entries in WordPress debug logs referencing malformed queries against wp_posts or wp_postmeta.
  • Anomalous read access patterns to sensitive tables such as wp_users or wp_usermeta from the WordPress database user.

Detection Strategies

  • Inspect AJAX traffic for TaxoPress autoterm actions and validate that post_types values match registered WordPress post type slugs.
  • Deploy Web Application Firewall (WAF) rules that identify SQL injection payloads targeting WordPress AJAX endpoints.
  • Correlate Editor account activity with unusual database read volume or error rates.

Monitoring Recommendations

  • Enable WordPress query logging or SAVEQUERIES in staging to capture raw SQL generated by the plugin.
  • Monitor plugin version inventory and alert when TaxoPress or simple-tags remains at 3.40.0 or earlier.
  • Track authentication events for Editor and Administrator accounts, especially newly created or dormant ones performing autoterm actions.

How to Mitigate CVE-2025-11972

Immediate Actions Required

  • Update the TaxoPress / simple-tags plugin to the version that includes commit fd35042, which is the release following 3.40.0.
  • Audit WordPress user accounts and remove or downgrade unnecessary Editor-and-above privileges.
  • Review recent database access logs for signs of UNION-based data extraction against wp_users or wp_options.

Patch Information

The vendor addressed the flaw in pull request #2828 merged via commit fd35042. The patch normalizes post_types and post_status array elements with sanitize_key(), constructs %s placeholders for each element, and executes the query through $wpdb->prepare(). Additional validation was added in inc/autoterms-functions.php via the new taxopress_sanitize_post_type_status() helper. See the Wordfence advisory and the issue tracker entry for further reference.

Workarounds

  • Temporarily deactivate the TaxoPress / simple-tags plugin until the patched version is deployed.
  • Restrict Editor and Administrator role assignment to trusted accounts with strong, unique credentials and multi-factor authentication.
  • Deploy WAF rules to block SQL metacharacters in the post_types and post_status parameters of TaxoPress AJAX requests.
bash
# Update the plugin from WP-CLI to the fixed release
wp plugin update simple-tags

# Verify the installed version is above 3.40.0
wp plugin get simple-tags --field=version

# Optionally deactivate until patched
wp plugin deactivate simple-tags

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.