Read the docs
TI-2026-24443 Aliases CVE-2026-31891GHSA-7x5c-vfhj-9628

Cockpit CMS has SQL Injection in MongoLite Aggregation Optimizer via toJsonExtractRaw()

Priority LOW 34CWE-89Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
SQL injection
Confidentiality · integrity · availability
High · None · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-89.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00413 35th percentileScored 2026-11-07
Fix Fixed Cockpit (Cockpit-HQ): 2.13.5cockpit-hq/cockpit (Packagist): 2.13.5

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
cockpit-hqCockpitbefore 2.13.52.13.5Patch availableCNA
—cockpit-hq/cockpit (Packagist)before 2.13.52.13.5Patch availableGHSA-7x5c-vfhj-9628
  • Cockpit Vendorcockpit-hq Affected before 2.13.5 Fixed in 2.13.5 Patch available CNA
  • cockpit-hq/cockpit (Packagist) Vendor— Affected before 2.13.5 Fixed in 2.13.5 Patch available GHSA-7x5c-vfhj-9628

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:agentejo:cockpit:*:*:*:*:*:*:*:*before 2.13.5Vulnerablecockpit-hq
  • cpe:2.3:a:agentejo:cockpit:*:*:*:*:*:*:*:* Versions before 2.13.5 Vulnerable ·cockpit-hq

Remediation

  • Fix · CNA Cockpit (Cockpit-HQ) Fixed in 2.13.5
  • Fix · GHSA-7x5c-vfhj-9628 cockpit-hq/cockpit (Packagist) Fixed in 2.13.5 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-31891
  2. 2026-10-03 Alias added: GHSA-7x5c-vfhj-9628

References

  • TI-2020-18291 Agentejo Cockpit before 0.11.2 allows NoSQL injection via the Controller/Auth.php resetpassword function. CVSS 3.1CRITICAL 9.8
  • TI-2020-18290 Agentejo Cockpit before 0.11.2 allows NoSQL injection via the Controller/Auth.php check function. CVSS 3.1CRITICAL 9.8
  • TI-2022-02511 Insufficient Session Expiration in cockpit-hq/cockpit CVSS 3.1CRITICAL 9.8
  • TI-2020-18292 Agentejo Cockpit before 0.11.2 allows NoSQL injection via the Controller/Auth.php newpassword function. CVSS 3.1CRITICAL 9.8
  • TI-2023-19207 A Cross-Site Request Forgery (CSRF) in the Admin portal of Cockpit CMS v2.5.2 allows… CVSS 3.1HIGH 8.8
  • TI-2023-01240 Unrestricted Upload of File with Dangerous Type in cockpit-hq/cockpit CVSS 3.1HIGH 8.8
See all 30 →

Sources