Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-9264 PoC — Grafana SQL Expressions allow for remote code execution

Source
Associated Vulnerability
Title: Grafana SQL Expressions allow for remote code execution (CVE-2024-9264)
Description:The SQL Expressions experimental feature of Grafana allows for the evaluation of `duckdb` queries containing user input. These queries are insufficiently sanitized before being passed to `duckdb`, leading to a command injection and local file inclusion vulnerability. Any user with the VIEWER or higher permission is capable of executing this attack. The `duckdb` binary must be present in Grafana's $PATH for this attack to function; by default, this binary is not installed in Grafana distributions.
Description
Grafana SQL Expressions → DuckDB LFI (CVE-2024-9264)
Readme
# Day 5 – Grafana SQL Expressions → DuckDB LFI (CVE-2024-9264)

**TL;DR:** On affected Grafana 11.x builds, a logged-in Viewer can use **SQL Expressions**.
Grafana forwards the expression to **DuckDB** on the server. With `read_text()` / `read_blob()`,
you can read local files (LFI). We plant a flag at `/opt/flag.txt`.

## Build → Run
```bash
docker build -t day5-grafana .
docker rm -f day5 2>/dev/null || true
docker run -d --name day5 -p 3000:3000 day5-grafana
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →