Medium severity · published Mar 18, 2026
CVE-2026-31891
Cockpit CMS has SQL Injection in MongoLite Aggregation Optimizer via toJsonExtractRaw()
6.5
CVSS
0.4%
EPSS
No
On KEV
Description
Cockpit is a headless content management system. Any Cockpit CMS instance running version 2.13.4 or earlier with API access enabled is potentially affected by a a SQL Injection vulnerability in the MongoLite Aggregation Optimizer. Any deployment where the `/api/content/aggregate/{model}` endpoint is publicly accessible or reachable by untrusted users may be vulnerable, and attackers in possession of a valid read-only API key (the lowest privilege level) can exploit this vulnerability — no admin access is required. An attacker can inject arbitrary SQL via unsanitized field names in aggregation queries, bypass the `_state=1` published-content filter to access unpublished or restricted content, and extract unauthorized data from the underlying SQLite content database. This vulnerability has been patched in version 2.13.5. The fix applies the same field-name sanitization introduced in v2.13.3 for `toJsonPath()` to the `toJsonExtractRaw()` method in `lib/MongoLite/Aggregation/Optimizer.php`, closing the injection vector in the Aggregation Optimizer.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
High
Integrity
None
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.4% · higher than 35% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
CO
Cockpit · Cockpit-HQ
< 2.13.5 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-31891
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-31891
Product
https://github.com/Cockpit-HQ/Cockpit/releases/tag/2.13.5
Patch
https://github.com/Cockpit-HQ/Cockpit/security/advisories/GHSA-7x5c-vfhj-9628
More from Cockpit
7.5
CVE-2026-58467
Cockpit CMS 2.14.0 - Path Traversal Local File Inclusion via index.php
6.3
CVE-2026-6626
Cockpit-HQ Cockpit Asset Handler/Aggregate data query logic injection
5.4
CVE-2026-23695
Cockpit CMS 2.14.0 Stored XSS via Set Field Display Template
5.3
CVE-2026-109379
Cockpit CMS 2.14.1 Account Enumeration via Timing Discrepancy in /auth/check
5.3
CVE-2026-82449
Cockpit CMS before 2.14.1 Account Enumeration via Auth Timing
