Vulnerability Details CVE-2026-22850
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.
Exploit prediction scoring system (EPSS) score
EPSS Score 0.001
EPSS Ranking 16.4%
CVSS Severity
CVSS v3 Score 8.3
Products affected by CVE-2026-22850
-
cpe:2.3:a:ibericode:koko_analytics:-
-
cpe:2.3:a:ibericode:koko_analytics:1.0.0
-
cpe:2.3:a:ibericode:koko_analytics:1.0.1
-
cpe:2.3:a:ibericode:koko_analytics:1.0.10
-
cpe:2.3:a:ibericode:koko_analytics:1.0.11
-
cpe:2.3:a:ibericode:koko_analytics:1.0.12
-
cpe:2.3:a:ibericode:koko_analytics:1.0.13
-
cpe:2.3:a:ibericode:koko_analytics:1.0.14
-
cpe:2.3:a:ibericode:koko_analytics:1.0.15
-
cpe:2.3:a:ibericode:koko_analytics:1.0.16
-
cpe:2.3:a:ibericode:koko_analytics:1.0.17
-
cpe:2.3:a:ibericode:koko_analytics:1.0.18
-
cpe:2.3:a:ibericode:koko_analytics:1.0.19
-
cpe:2.3:a:ibericode:koko_analytics:1.0.2
-
cpe:2.3:a:ibericode:koko_analytics:1.0.20
-
cpe:2.3:a:ibericode:koko_analytics:1.0.21
-
cpe:2.3:a:ibericode:koko_analytics:1.0.22
-
cpe:2.3:a:ibericode:koko_analytics:1.0.23
-
cpe:2.3:a:ibericode:koko_analytics:1.0.24
-
cpe:2.3:a:ibericode:koko_analytics:1.0.25
-
cpe:2.3:a:ibericode:koko_analytics:1.0.26
-
cpe:2.3:a:ibericode:koko_analytics:1.0.27
-
cpe:2.3:a:ibericode:koko_analytics:1.0.28
-
cpe:2.3:a:ibericode:koko_analytics:1.0.29
-
cpe:2.3:a:ibericode:koko_analytics:1.0.3
-
cpe:2.3:a:ibericode:koko_analytics:1.0.30
-
cpe:2.3:a:ibericode:koko_analytics:1.0.31
-
cpe:2.3:a:ibericode:koko_analytics:1.0.32
-
cpe:2.3:a:ibericode:koko_analytics:1.0.33
-
cpe:2.3:a:ibericode:koko_analytics:1.0.34
-
cpe:2.3:a:ibericode:koko_analytics:1.0.35
-
cpe:2.3:a:ibericode:koko_analytics:1.0.36
-
cpe:2.3:a:ibericode:koko_analytics:1.0.37
-
cpe:2.3:a:ibericode:koko_analytics:1.0.38
-
cpe:2.3:a:ibericode:koko_analytics:1.0.39
-
cpe:2.3:a:ibericode:koko_analytics:1.0.4
-
cpe:2.3:a:ibericode:koko_analytics:1.0.40
-
cpe:2.3:a:ibericode:koko_analytics:1.0.5
-
cpe:2.3:a:ibericode:koko_analytics:1.0.6
-
cpe:2.3:a:ibericode:koko_analytics:1.0.7
-
cpe:2.3:a:ibericode:koko_analytics:1.0.8
-
cpe:2.3:a:ibericode:koko_analytics:1.0.9
-
cpe:2.3:a:ibericode:koko_analytics:1.1.1
-
cpe:2.3:a:ibericode:koko_analytics:1.1.2
-
cpe:2.3:a:ibericode:koko_analytics:1.2.0
-
cpe:2.3:a:ibericode:koko_analytics:1.2.1
-
cpe:2.3:a:ibericode:koko_analytics:1.2.2
-
cpe:2.3:a:ibericode:koko_analytics:1.3.0
-
cpe:2.3:a:ibericode:koko_analytics:1.3.1
-
cpe:2.3:a:ibericode:koko_analytics:1.3.10
-
cpe:2.3:a:ibericode:koko_analytics:1.3.11
-
cpe:2.3:a:ibericode:koko_analytics:1.3.12
-
cpe:2.3:a:ibericode:koko_analytics:1.3.13
-
cpe:2.3:a:ibericode:koko_analytics:1.3.14
-
cpe:2.3:a:ibericode:koko_analytics:1.3.2
-
cpe:2.3:a:ibericode:koko_analytics:1.3.3
-
cpe:2.3:a:ibericode:koko_analytics:1.3.4
-
cpe:2.3:a:ibericode:koko_analytics:1.3.5
-
cpe:2.3:a:ibericode:koko_analytics:1.3.6
-
cpe:2.3:a:ibericode:koko_analytics:1.3.7
-
cpe:2.3:a:ibericode:koko_analytics:1.3.8
-
cpe:2.3:a:ibericode:koko_analytics:1.3.9