PHP
CVE-2026-31891
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain valid read-only API key
-
ExploitSend crafted aggregation request to /api/content/aggregate/{model}
-
ExecutionInject SQL via unsanitized field names
-
ImpactExtract sensitive data from database
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Cockpit CMS version 2.13.4 or earlier with API access enabled and /api/content/aggregate/{model} endpoint accessible. Attacker requires valid read-only API key (lowest privilege level). MongoLite Aggregation Optimizer processes unsanitized field names. |
| Impact | The CVSS 3.1 score of 7.7 (High) reflects network-based exploitation (AV:N) with low complexity (AC:L) requiring only low privileges (PR:L), specifically a read-only API key. The changed scope (S:C) indicates potential impact beyond the vulnerable component, though only confidentiality is affected (C:H, I:N, A:N). Without EPSS data or KEV listing, real-world exploitation likelihood remains theoretical, but the low barrier to entry (read-only API key) and straightforward attack vector make this a genuine priority for internet-exposed Cockpit instances. The vulnerability aligns with SSVC's 'attend' decision given its automatable nature, network accessibility, and high technical impact on data confidentiality. |
| Exploit ScenarioDerived | An attacker obtains a read-only API key through social engineering or by finding it in exposed configuration files, then sends crafted requests to the /api/content/aggregate/{model} endpoint with malicious field names containing SQL injection payloads. This allows the attacker to bypass content filters and extract sensitive unpublished data from the SQLite database, potentially exposing draft content, user information, or other confidential data stored in the CMS. The attack requires no user interaction and can be automated to extract large amounts of data remotely. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 17, 2026
SQL injection in Cockpit CMS version 2.13.4 and earlier allows attackers with a valid read-only API key to inject arbitrary SQL through the /api/content/aggregate/{model} endpoint and extract unauthorized data from the SQLite database, including unpublished content. The vulnerability requires network access and low-privilege API credentials, enabling data exfiltration without administrative privileges. No patch is currently available.
Earlier versions of this analysis (1)
A SQL injection vulnerability exists in the MongoLite Aggregation Optimizer of Cockpit CMS versions 2.13.4 and earlier, allowing attackers with read-only API access to inject arbitrary SQL through unsanitized field names in aggregation queries. The vulnerability enables unauthorized data extraction from the SQLite content database, including access to unpublished content, posing a high confidentiality risk. No active exploitation has been reported (not in KEV), and no EPSS score is available, though the low attack complexity and remote exploitability make this a priority for exposed installations.
RemediationAI
Immediately upgrade Cockpit CMS to version 2.13.5 or later, which applies proper field-name sanitization to the toJsonExtractRaw() method (see release at https://github.com/Cockpit-HQ/Cockpit/releases/tag/2.13.5). For installations that cannot immediately upgrade, consider temporarily restricting access to the /api/content/aggregate/{model} endpoint through web server configuration or firewall rules, limiting API access to trusted IP addresses only. Review and rotate any API keys that may have been exposed, as even read-only keys can be used to exploit this vulnerability.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in composer
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability affects Cockpit CMS (CPE: pkg:composer/cockpit-hq_cockpit), specifically in the MongoLite Aggregation Optimizer component at the /api/content/aggregate/{model} endpoint. As classified under CWE-89 (Improper Neutralization of Special Elements used in an SQL Command), the flaw stems from inadequate input sanitization in the toJsonExtractRaw() method within lib/MongoLite/Aggregation/Optimizer.php, where field names are not properly sanitized before being incorporated into SQL queries. MongoLite is Cockpit's embedded database abstraction layer that translates MongoDB-style queries to SQLite operations, and the vulnerability allows injection at this translation layer.
Know when PHP gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
Impact
This is a SQL Injection vulnerability in the MongoLite Aggregation Optimizer.
Any Cockpit CMS instance running version 2.13.4 or earlier with API access enabled is potentially affected.
Who is impacted:
- Any deployment where the
/api/content/aggregate/{model}endpoint is publicly
accessible or reachable by untrusted users.
- Attackers in possession of a valid read-only API key (the lowest privilege level)
can exploit this vulnerability - no admin access is required.
What an attacker can do:
- Inject arbitrary SQL via unsanitized field names in aggregation queries.
- Bypass the
_state=1published-content filter to access unpublished or restricted content. - Extract unauthorized data from the underlying SQLite content database.
Confidentiality impact is High. Integrity and availability are not directly affected by this vulnerability.
Patches
This vulnerability has been patched in version 2.13.5.
All users running Cockpit CMS version 2.13.4 or earlier are strongly advised to upgrade to 2.13.5 or later immediately.
- https://github.com/Cockpit-HQ/Cockpit/releases/tag/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.
Executive ViewAI
A SQL injection vulnerability in Cockpit CMS versions 2.13.4 and earlier allows attackers with read-only API access to extract sensitive data from the content database, including unpublished materials. Organizations running affected versions face confidentiality risk, particularly if the CMS is internet-facing or accessible to untrusted users.
Implement network segmentation to restrict API access to authorized internal users only; deploy WAF rules to block common SQL injection patterns in aggregation query parameters; disable public API access if not required; apply API rate limiting and request filtering; monitor aggregation query logs for suspicious field name patterns; consider air-gapping the CMS from production until patch is available.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Affected Products (CPE)GitHub Advisory
Related Vulnerabilities in Cockpit CMS API SQL Injection
View all 2In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
GHSA-7x5c-vfhj-9628
NVD
CVE.org
EPSS
VulDB
Exploit-DB