
CVE-2026-27876

A chained vulnerability allowing arbitrary file writes through SQL Expressions, leading to full Remote Code Execution (RCE) on the host.
CVE ID: CVE-2026-27876
Severity: Critical (CVSS v3.1: 9.1)
Published: March 27, 2026
CWE: CWE-94 (Improper Control of Generation of Code / Code Injection)
Grafana's SQL Expressions feature (introduced/reimplemented in v11.6.0 with MySQL-like syntax) allows users to transform query data using familiar SQL. However, this capability inadvertently permitted arbitrary file writes to the filesystem. When chained with specific components (including a Grafana Enterprise plugin), this leads to remote arbitrary code execution (RCE).
Attackers with sufficient permissions can overwrite critical files (e.g., Sqlyze driver or AWS data source configs), potentially gaining an SSH connection to the Grafana host.
Note: The underlying feature exists in Grafana OSS, but the full exploit chain often involves Enterprise plugin components. All users are strongly advised to update to prevent future attack vectors.
Prerequisites for Exploitation:
sqlExpressions feature toggle must be enabledAttack Vector: Network (AV:N)
Attack Complexity: Low (AC:L)
Privileges Required: High (PR:H)
User Interaction: None (UI:N)
Scope: Changed (S:C)
Confidentiality/Integrity/Availability: High (C:H/I:H/A:H)
sqlExpressions enabledEnterprise plugin involvement noted in several reports for the full chain.
Upgrade immediately to one of the following patched releases:
Download links available on the official Grafana site.
Upgrade to a fixed version as soon as possible.
sqlExpressions feature toggle (most effective single step)⚠️ Workarounds may impact functionality and do not fully eliminate risk in all scenarios.
Discovered by: Liad Eliyahu (Head of Research at Miggo Security) via Grafana Labs' bug bounty program. Responsible disclosure acknowledged.
Update your Grafana instances today. Monitor official channels for any follow-up advisories.
| Branch | Fixed Version |
|---|
| Latest | 12.4.2 |
| 12.3 | 12.3.6 |
| 12.2 | 12.2.8 |
| 12.1 | 12.1.10 |
| 11.6 | 11.6.14 |