CVE-2026-22850 Details
Description
Koko Analytics is an open-source analytics plugin for WordPress. Versions prior to 2.1.3 are vulnerable to arbitrary SQL execution through unescaped analytics export/import and permissive admin SQL import. Unauthenticated visitors can submit arbitrary path (`pa`) and referrer (`r`) values to the public tracking endpoint in src/Resources/functions/collect.php, which stores those strings verbatim in the analytics tables. The admin export logic in src/Admin/Data_Export.php writes these stored values directly into SQL INSERT statements without escaping. A crafted path such as "),('999','x');DROP TABLE wp_users;-- breaks out of the value list. When an administrator later imports that export file, the import handler in src/Admin/Data_Import.php reads the uploaded SQL with file_get_contents, performs only a superficial header check, splits on semicolons, and executes each statement via $wpdb->query with no validation of table names or statement types. Additionally, any authenticated user with manage_koko_analytics can upload an arbitrary .sql file and have it executed in the same permissive way. Combined, attacker-controlled input flows from the tracking endpoint into exported SQL and through the import execution sink, or directly via malicious uploads, enabling arbitrary SQL execution. In a worst-case scenario, attackers can achieve arbitrary SQL execution on the WordPress database, allowing deletion of core tables (e.g., wp_users), insertion of backdoor administrator accounts, or other destructive/privilege-escalating actions. Version 2.1.3 patches the issue.
A vulnerability allowing arbitrary SQL execution has been identified in Koko Analytics, a WordPress analytics plugin, in versions prior to 2.1.3. The issue arises from unescaped data in the analytics export/import process and a permissive SQL import feature for administrators. Unauthenticated users can send arbitrary path and referrer values to the public tracking endpoint, which are then stored in the database. The export function writes these values directly into SQL statements without proper escaping. When an administrator imports the exported SQL, the import process executes the SQL commands without validating table names or statement types. Additionally, authenticated users with the 'manage_koko_analytics' capability can upload malicious .sql files that are executed in the same unvalidated manner. This vulnerability could lead to severe consequences, such as deleting core WordPress tables, inserting backdoor administrator accounts, or other destructive actions.
Users can update to Koko Analytics version 2.1.3, which addresses the vulnerability by escaping path and URL values in the export process. After updating, it's recommended to review and clean the database of any potentially injected SQL payloads before reactivating the plugin.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 20, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| ibericode koko analytics | < 2.1.3 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 9, 2026 | Initial Analysis | [email protected] |
| Jan 19, 2026 | New CVE Received | [email protected] |