CVE-2026-22850
Koko Analytics vulnerable to arbitrary SQL execution through unescaped analytics export/import and permissive admin SQL import
Mitigation
- Upgrade koko-analytics to 2.1.3 or later.
Who should check
- Anyone running ibericode koko-analytics < 2.1.3
Vulnerability facts
- Affected
- ibericode koko-analytics < 2.1.3
- Fixed in
- ibericode koko-analytics 2.1.3
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, no login needed
- CVSS
- 8.4 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: None
- User interaction: Required
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.74% chance of exploitation in 30 days (percentile 51, 2026-11-26)
- CWE
- CWE-89
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| ibericode koko-analytics | < 2.1.3 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-22850. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-22850.md Affected: ibericode koko-analytics < 2.1.3 Fixed in: ibericode koko-analytics 2.1.3 Steps: 1. Search this machine and project for ibericode koko-analytics: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2026-22850 being exploited?
There is no confirmed exploitation: CVE-2026-22850 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.74% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-22850?
High: CVSS 8.4 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2026-22850?
ibericode koko-analytics < 2.1.3.
Is there a fix for CVE-2026-22850?
Yes. Fixed in ibericode koko-analytics 2.1.3. Upgrade koko-analytics to 2.1.3 or later.
How do I check if I'm affected by CVE-2026-22850?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.