Grafana
RCE on Grafana via sqlExpressions
A chained attack via SQL Expressions and a Grafana Enterprise plugin can lead to a remote arbitrary code execution impact (RCE). This is enabled by a feature in Grafana (OSS), so all users are always recommended to update to avoid future attack vectors going this path. Only instances with the sqlExpressions feature toggle enabled are vulnerable. Only instances in the following version ranges are affected: - 11.6.0 (inclusive) to 11.6.14 (exclusive): 11.6.14 has the fix. 11.5 and below are not affected. - 12.0.0 (inclusive) to 12.1.10 (exclusive): 12.1.10 has the fix. 12.0 did not receive an update, as it is end-of-life. - 12.2.0 (inclusive) to 12.2.8 (exclusive): 12.2.8 has the fix. - 12.3.0 (inclusive) to 12.3.6 (exclusive): 12.3.6 has the fix. - 12.4.0 (inclusive) to 12.4.2 (exclusive): 12.4.2 has the fix. 13.0.0 and above also have the fix: no v13 release is affected.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 11.6.0, < 11.6.14
- >= 12.0.0, < 12.1.10
- >= 12.2.0, < 12.2.8
- >= 12.3.0, < 12.3.6
- >= 12.4.0, < 12.4.2
Fixed in 11.6.14, 12.1.10, 12.2.8, 12.3.6, 12.4.2
Mitigation
Upgrade Grafana to 11.6.14 or 12.1.10 or 12.2.8 or 12.3.6 or 12.4.2 or later.
References
- Vendor advisory grafana.com/security/security-advisories/cve-20…
Timeline
Days relative to CVE publicationFirst public PoC 3 days after publication; not in CISA KEV. First PoC: 0xBlackash/CVE-2026-27876 (created 30 Mar 2026, found by us: backfilled).
PoC repositories
Found on GitHub.4 PoCs
PoCs 4
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| 0xBlackash/CVE-2026-27876 | 30 Mar 2026 +3 d | 3 | PoC |
| 0xredash/CVE-2026-27876 | 30 Mar 2026 +3 d | 3 | PoC |
| ashrafzaryouh/CVE-2026-27876 | 30 Mar 2026 +3 d | 3 | PoC |
| atiilla/CVE-2026-27876 | 5 Sep 2026 +162 d | 1 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 4 PoC reposGET /api/health
- Ports
- 3000, 3333
- Seen in
- 4 repos: 0xBlackash/CVE-2026-27876, 0xredash/CVE-2026-27876, ashrafzaryouh/CVE-2026-27876, atiilla/CVE-2026-27876
- Evidence
- 0xBlackash/CVE-2026-27876/CVE-2026-27876-check.yaml:26 0xredash/CVE-2026-27876/CVE-2026-27876-check.yaml:26 ashrafzaryouh/CVE-2026-27876/CVE-2026-27876-check.yaml:26 atiilla/CVE-2026-27876/poc/exploit.py:251
POST /api/ds/query
- Key headers
Authorization: Basic {var}- Body markers
"queries""refId":"A""datasource""type":"__expr__""uid":"__expr__""type":"sql""expression""from":"now-1h""to":"now"inapplication/json- Ports
- 3000, 3333
- Seen in
- 1 repo: atiilla/CVE-2026-27876
- Evidence
- atiilla/CVE-2026-27876/analysis.md:124 atiilla/CVE-2026-27876/poc/exploit.py:205 atiilla/CVE-2026-27876/poc/exploit.py:331 atiilla/CVE-2026-27876/poc/exploit.py:419
GET /api/org
- Ports
- 3000, 3333
- Seen in
- 1 repo: atiilla/CVE-2026-27876
- Evidence
- atiilla/CVE-2026-27876/poc/exploit.py:178
GET /api/user
- Ports
- 3000, 3333
- Seen in
- 1 repo: atiilla/CVE-2026-27876
- Evidence
- atiilla/CVE-2026-27876/poc/exploit.py:184
POST /login
- Body markers
"user""password"inapplication/json- Ports
- 3000, 3333
- Seen in
- 1 repo: atiilla/CVE-2026-27876
- Evidence
- atiilla/CVE-2026-27876/poc/exploit.py:165
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/api/health(?:[?#].*)?$
(?i)^/api/ds/query(?:[?#].*)?$
(?i)^/api/org(?:[?#].*)?$
(?i)^/api/user(?:[?#].*)?$
(?i)^/login(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [3000,3333] (msg:"GG PoC-Monitor CVE-2026-27876 Grafana Grafana exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/health"; reference:url,poc.griffinguard.io/cve/CVE-2026-27876; classtype:web-application-attack; sid:9561719; rev:1;)
alert http any any -> $HOME_NET [3000,3333] (msg:"GG PoC-Monitor CVE-2026-27876 Grafana Grafana exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/ds/query"; http.header; content:"Authorization: Basic "; nocase; http.request_body; content:"|22|queries|22|"; http.request_body; content:"|22|refId|22|:|22|A|22|"; http.request_body; content:"|22|datasource|22|"; http.request_body; content:"|22|type|22|:|22|__expr__|22|"; http.request_body; content:"|22|uid|22|:|22|__expr__|22|"; http.request_body; content:"|22|type|22|:|22|sql|22|"; http.request_body; content:"|22|expression|22|"; http.request_body; content:"|22|from|22|:|22|now-1h|22|"; http.request_body; content:"|22|to|22|:|22|now|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-27876; classtype:web-application-attack; sid:9865403; rev:1;)
alert http any any -> $HOME_NET [3000,3333] (msg:"GG PoC-Monitor CVE-2026-27876 Grafana Grafana exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/org"; reference:url,poc.griffinguard.io/cve/CVE-2026-27876; classtype:web-application-attack; sid:9660273; rev:1;)
alert http any any -> $HOME_NET [3000,3333] (msg:"GG PoC-Monitor CVE-2026-27876 Grafana Grafana exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/user"; reference:url,poc.griffinguard.io/cve/CVE-2026-27876; classtype:web-application-attack; sid:9212362; rev:1;)
alert http any any -> $HOME_NET [3000,3333] (msg:"GG PoC-Monitor CVE-2026-27876 Grafana Grafana exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/login"; http.request_body; content:"|22|user|22|"; http.request_body; content:"|22|password|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-27876; classtype:web-application-attack; sid:9277045; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: Grafana Grafana exploit attempt (CVE-2026-27876)
id: gg-pocmon-cve-2026-27876-9561719
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-27876. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-27876
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/api/health'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.27876
title: Grafana Grafana exploit attempt (CVE-2026-27876)
id: gg-pocmon-cve-2026-27876-9865403
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-27876. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-27876
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/ds/query'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.27876
title: Grafana Grafana exploit attempt (CVE-2026-27876)
id: gg-pocmon-cve-2026-27876-9660273
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-27876. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-27876
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/api/org'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.27876
title: Grafana Grafana exploit attempt (CVE-2026-27876)
id: gg-pocmon-cve-2026-27876-9212362
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-27876. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-27876
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/api/user'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.27876
title: Grafana Grafana exploit attempt (CVE-2026-27876)
id: gg-pocmon-cve-2026-27876-9277045
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-27876. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-27876
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/login'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.27876