SQL Injection Affecting cockpit-hq/cockpit package, versions <2.13.5


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.01% (2nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-COCKPITHQCOCKPIT-15679888
  • published18 Mar 2026
  • disclosed17 Mar 2026
  • creditffasterss

Introduced: 17 Mar 2026

CVE-2026-31891  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade cockpit-hq/cockpit to version 2.13.5 or higher.

Overview

Affected versions of this package are vulnerable to SQL Injection via the toJsonExtractRaw function in the MongoLite Aggregation Optimizer. An attacker can extract unauthorized data from the underlying database by injecting arbitrary SQL through unsanitized field names in aggregation queries. This is only exploitable if API access is enabled and the /api/content/aggregate/{model} endpoint is accessible to users with a valid read-only API key.

CVSS Base Scores

version 4.0
version 3.1