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 Grafanas $PATH for this attack to function; by default, this binary is not installed in Grafana distributions.
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
Name | Vendor | Start Version | End Version |
---|---|---|---|
Grafana | Grafana | 11.0.0 (including) | 11.0.0 (including) |
Command injection vulnerabilities typically occur when:
Many protocols and products have their own custom command language. While OS or shell command strings are frequently discovered and targeted, developers may not realize that these other command languages might also be vulnerable to attacks. Command injection is a common problem with wrapper programs.