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.
Published: 2026-01-19
Score: 8.4 High
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary SQL Execution
Action: Immediate Patch
AI Analysis

Impact

Koko Analytics exposes a classic SQL injection (CWE-89) by storing unescaped tracking data and regurgitating it into SQL INSERT statements during export. Attacker‑controlled path or referrer values can break out of the value list, and when an administrator imports that export, the plugin executes the injected payload against the WordPress database without validation. The result is arbitrary SQL execution, which can delete core tables, inject backdoor admin accounts, or perform other destructive actions.

Affected Systems

All installations of IBERICODE Koko Analytics for WordPress that are running a version older than 2.1.3 are affected. Vulnerability exists in the tracking endpoint, export routine, and import handler. The plugin must be active on a WordPress site for the flaw to be relevant.

Risk and Exploitability

The CVSS score of 8.4 reflects a high‑severity data‑destructive flaw, while the EPSS score of less than 1% indicates that exploitation is currently uncommon. The vulnerability is not listed in the CISA KEV catalog. Based on the description, the likely attack vector involves an unauthenticated attacker submitting malicious tracking data, followed by an authenticated administrator importing the crafted export file; alternatively, any authenticated user with the manage_koko_analytics capability can upload a malicious SQL file directly and have it executed.

Generated by OpenCVE AI on April 18, 2026 at 15:53 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Koko Analytics to version 2.1.3 or newer to ensure proper input escaping and SQL validation.
  • Revoke the manage_koko_analytics capability from all users except trusted administrators, thereby preventing unauthorized SQL uploads.
  • Delete any existing export files created from the vulnerable tracking endpoint and avoid importing them until the plugin is patched.

Generated by OpenCVE AI on April 18, 2026 at 15:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 09 Mar 2026 21:30:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:ibericode:koko_analytics:*:*:*:*:*:wordpress:*:*

Tue, 20 Jan 2026 22:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 20 Jan 2026 08:45:00 +0000

Type Values Removed Values Added
First Time appeared Ibericode
Ibericode koko Analytics
Wordpress
Wordpress wordpress
Vendors & Products Ibericode
Ibericode koko Analytics
Wordpress
Wordpress wordpress

Mon, 19 Jan 2026 17:00:00 +0000

Type Values Removed Values Added
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.
Title Koko Analytics vulnerable to arbitrary SQL execution through unescaped analytics export/import and permissive admin SQL import
Weaknesses CWE-89
References
Metrics cvssV3_1

{'score': 8.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H'}


Subscriptions

Ibericode Koko Analytics
Wordpress Wordpress
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-01-20T21:35:14.638Z

Reserved: 2026-01-12T16:20:16.745Z

Link: CVE-2026-22850

cve-icon Vulnrichment

Updated: 2026-01-20T21:35:12.346Z

cve-icon NVD

Status : Analyzed

Published: 2026-01-19T17:15:50.430

Modified: 2026-03-09T21:16:44.957

Link: CVE-2026-22850

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-18T16:00:04Z

Weaknesses