CVE-2026-31891 Cockpit CMS has SQL Injection in MongoLite Aggregation Optimizer via toJsonExtractRaw()
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- PHPUbuntu
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.
Upgrade path
4 packages: 2 fixed, 1 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/cockpit(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| agentejo cockpit | < 2.13.5 | 2.13.5 | Fixed |
| cockpit-hq/cockpit(Packagist) | < 2.13.5; = 2.0.0; = 2.0.1; = 2.0.2 +56 more | 2.13.5 | Fixed |
| cockpit-hq/cockpit | = < 2.13.5 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| cockpit-hq/cockpit(Packagist) | < 2.13.5 | 2.13.5 |
| cockpit-hq/cockpit(Packagist) | = 2.0.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.0.1 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.0.2 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.1.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.1.1 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.1.2 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.10.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.10.1 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.10.2 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.10.3 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.11.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.11.1 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.11.2 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.11.3 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.11.4 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.12.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.12.1 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.13.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.13.1 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.13.2 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.13.3 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.13.4 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.2.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.2.1 | No fix listed |
Show 38 more
| Product | Affected versions | Fixed in |
|---|---|---|
| cockpit-hq/cockpit(Packagist) | = 2.2.2 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.3.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.3.1 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.3.2 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.3.3 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.3.4 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.3.5 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.3.6 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.3.7 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.3.8 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.3.9 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.4.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.4.1 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.5.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.5.1 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.5.2 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.6.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.6.1 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.6.2 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.6.3 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.7.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.7.1 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.7.2 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.8.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.8.1 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.8.2 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.8.3 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.8.4 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.8.5 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.8.6 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.9.0 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.9.1 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.9.2 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.9.3 | No fix listed |
| cockpit-hq/cockpit(Packagist) | = 2.9.4 | No fix listed |
| cockpit-hq/cockpit | = < 2.13.5 | No fix listed |
| ubuntu/cockpit(Ubuntu:26.10) | All versions | No fix listed |
| agentejo cockpit | < 2.13.5 | 2.13.5 |
References
- https://github.com/Cockpit-HQ/Cockpit/security/advisories/GHSA-7x5c-vfhj-9628 patch vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com product
- https://github.com/Cockpit-HQ/Cockpit/releases/tag/2.13.5 product release-notes
- github.com
- Ubuntu CVE tracker vendor-advisory
- www.cve.org