{"answers":{"affected":"8 open source packages ship an affected version, including github.com/grafana/grafana and grafana. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-9264 exists.","fix":"Upgrade github.com/grafana/grafana to a fixed version for your release line: 11.0.6+security-01, 11.1.7+security-01 or 11.2.2+security-01.","what":"CVE-2024-9264 is a critical command injection vulnerability in Grafana Grafana, published on 18 Oct 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-9264 and fix it if it is affected.\n\nWhat it is: CVE-2024-9264 is a critical command injection vulnerability in Grafana Grafana, published on 18 Oct 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-9264 exists.\n\nAffected packages and fixed versions:\n- github.com/grafana/grafana (Go): affected all versions; no fix listed\n- github.com/grafana/grafana (Go): affected from 11.0.0; fixed in 11.0.6+security-01\n- github.com/grafana/grafana (Go): affected from 11.0.0; fixed in 11.0.6+security-01\n- github.com/grafana/grafana (Go): affected from 11.1.0; fixed in 11.1.7+security-01\n- github.com/grafana/grafana (Go): affected from 11.1.0; fixed in 11.1.7+security-01\n- github.com/grafana/grafana (Go): affected from 11.2.0; fixed in 11.2.2+security-01\n- github.com/grafana/grafana (Go): affected from 11.2.0; fixed in 11.2.2+security-01\n- grafana (Bitnami): affected from 11.0.0; fixed in 11.2.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-9264/ (Markdown: https://insights.sbomify.com/CVE-2024-9264/index.md)","id":"CVE-2024-9264","markdown":"https://insights.sbomify.com/CVE-2024-9264/index.md","name":"CVE-2024-9264","record":{"aliases":["BIT-grafana-2024-9264","GHSA-q99m-qcv4-fpm7","GO-2024-3215","MINI-46wj-669r-wqqp","MINI-72gw-xxrx-hqq8","MINI-777w-phrm-h39p","MINI-7pf4-x5fj-gg9x","MINI-9jcp-6jhq-rfwq","MINI-9p88-ch6f-mxx4","MINI-c3xc-54hr-hcr2","MINI-chgp-8xpm-mrm2","MINI-cxf5-f737-259f","MINI-hp3r-mhmp-cm9r","MINI-hqq2-whrr-6hr2","MINI-j5v3-xv6p-wvgr","MINI-m3r5-rwg8-8cwg","MINI-p45f-gm69-5qh4","MINI-pvxh-f4rp-qgrc","MINI-qp4g-xxmm-4m9x","MINI-rmrw-592m-6gpv","UBUNTU-CVE-2024-9264"],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"Grafana monitoring platform","requires_auth":"low_privilege","summary":"Attackers with viewer permissions can execute arbitrary commands and read local files via unsanitized SQL expressions if the duckdb binary is installed.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GRAFANA","cpe":[{"product":"grafana","vendor":"grafana"}],"cvss":{"score":9.4,"severity":"critical","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","version":"4.0"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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.","ecosystems":["Bitnami","Go"],"exploits":{"exploitdb":0,"first_seen":"2024-10-17","github_poc":14,"max_poc_stars":133,"metasploit":1,"nuclei":1,"refs":[{"date":"2024-10-19T13:50:52Z","kind":"github_poc","ref":"https://github.com/nollium/CVE-2024-9264","stars":133,"title":"Exploit for Grafana arbitrary file-read and RCE (CVE-2024-9264)"},{"date":"2024-10-21T03:36:05Z","kind":"github_poc","ref":"https://github.com/z3k0sec/CVE-2024-9264-RCE-Exploit","stars":38,"title":"Grafana RCE exploit (CVE-2024-9264)"},{"date":"2024-10-20T01:13:37Z","kind":"github_poc","ref":"https://github.com/z3k0sec/File-Read-CVE-2024-9264","stars":8,"title":"File Read Proof of Concept for CVE-2024-9264"},{"date":"2025-05-31T20:06:53Z","kind":"github_poc","ref":"https://github.com/Cythonic1/CVE-2024-9264","stars":3,"title":"A go implementation for CVE-2024-9264 which effect grafana versions 11.0.x, 11.1.x, and 11.2.x. "},{"date":"2025-07-07T15:57:21Z","kind":"github_poc","ref":"https://github.com/rvzsec/CVE-2024-9264","stars":2,"title":"Authenticated RCE in Grafana (v11.0) via SQL Expressions - PoC Exploit"},{"date":"2024-10-17","kind":"metasploit","ref":"exploit/multi/http/grafana_sql_expressions_rce_cve_2024_9264","stars":null,"title":"Grafana SQL Expressions DuckDB Command Injection"},{"date":"2025-06-15T00:38:47Z","kind":"github_poc","ref":"https://github.com/Exerrdev/CVE-2024-9264-Fixed","stars":0,"title":null},{"date":"2025-07-05T14:03:01Z","kind":"github_poc","ref":"https://github.com/Royall-Researchers/CVE-2024-9264","stars":0,"title":null}],"tier":"weaponised"},"has_fix":true,"headline":"Grafana SQL Expressions allow for remote code execution","id":"CVE-2024-9264","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"grafana:grafana","products":["grafana:grafana"],"type":"command_injection","year":"2024"},"n_packages":8,"n_references":1,"next":{"headline":"Echo RSS Feed Post Generator \u003c= 5.4.6 - Unauthenticated Privilege Escalation","id":"CVE-2024-9265"},"packages":[{"ecosystem":"Bitnami","fixed":["11.2.2"],"introduced":["11.0.0"],"last_affected":[],"package":"grafana","purl":"pkg:bitnami/grafana","source":"BIT-grafana-2024-9264"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"GO-2024-3215"},{"ecosystem":"Go","fixed":["11.0.6+security-01"],"introduced":["11.0.0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":null,"source":"GHSA-q99m-qcv4-fpm7"},{"ecosystem":"Go","fixed":["11.0.6+security-01"],"introduced":["11.0.0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"GHSA-q99m-qcv4-fpm7"},{"ecosystem":"Go","fixed":["11.1.7+security-01"],"introduced":["11.1.0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":null,"source":"GHSA-q99m-qcv4-fpm7"},{"ecosystem":"Go","fixed":["11.1.7+security-01"],"introduced":["11.1.0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"GHSA-q99m-qcv4-fpm7"},{"ecosystem":"Go","fixed":["11.2.2+security-01"],"introduced":["11.2.0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":null,"source":"GHSA-q99m-qcv4-fpm7"},{"ecosystem":"Go","fixed":["11.2.2+security-01"],"introduced":["11.2.0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"GHSA-q99m-qcv4-fpm7"}],"prev":{"headline":"Auth bypass in Timetics – Appointment Booking \u0026 Scheduling","id":"CVE-2024-9263"},"products":["Grafana"],"published":"2024-10-18","related":[{"cvss_score":7.5,"headline":"Grafana Path Traversal","id":"CVE-2021-43798","kev_date_added":"2025-10-09","published":"2021-12-07"},{"cvss_score":10,"headline":"Incorrect privilege assignment","id":"CVE-2025-41115","kev_date_added":null,"published":"2025-11-21"},{"cvss_score":9.8,"headline":"Grafana vulnerable to race condition allowing privilege escalation","id":"CVE-2022-39328","kev_date_added":null,"published":"2022-11-08"},{"cvss_score":9.8,"headline":"Auth bypass in n/a","id":"CVE-2022-28660","kev_date_added":null,"published":"2022-05-20"},{"cvss_score":9.8,"headline":"Information disclosure in n/a","id":"CVE-2022-26148","kev_date_added":null,"published":"2022-03-21"},{"cvss_score":9.8,"headline":"Grafana Authentication Bypass","id":"CVE-2018-15727","kev_date_added":null,"published":"2018-08-29"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-03-14","vendors":["Grafana"]},"summary":"Attackers with viewer permissions can execute arbitrary commands and read local files via unsanitized SQL expressions if the duckdb binary is installed.","url":"https://insights.sbomify.com/CVE-2024-9264/"}