GHSA-7rqg-hjwc-6mjf is a medium-severity (CVSS 6.4) Cross-site Scripting (XSS) vulnerability in github.com/grafana/grafana. A fix is available for github.com/grafana/grafana — see the affected versions and patch details below.
Grafana vulnerable to Stored Cross-site Scripting in Text plugin
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-7rqg-hjwc-6mjf.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-7rqg-hjwc-6mjf by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 379,842 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
github.com/grafana/grafana🐹github.com/grafana/grafanaReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Description
On 2023-01-01 during an internal audit of Grafana, a member of the security team found a stored XSS vulnerability affecting the core plugin "Text".
The stored XSS vulnerability requires several user interactions in order to be fully exploited. The vulnerability was possible due to React's render cycle that will pass though the unsanitized HTML code, but in the next cycle the HTML is cleaned up and saved in Grafana's database.
Impact
An attacker needs to have the Editor role in order to change a Text panel to include JavaScript. later, an another user needs to edit the same Text panel, and click on "Markdown" or "HTML" for the code to be executed. This means that vertical privilege escalation is possible, where a user with Editor role can change to a known password for a user having Admin role if the user with Admin role executes malicious JavaScript viewing a dashboard.
Impacted versions
Grafana versions between 9.2.0 and 9.2.10. and between 9.3.0 and 9.3.4
Solutions and mitigations
Update your Grafana instance.
Reporting security issues
If you think you have found a security vulnerability, please send a report to [email protected]. This address can be used for all of Grafana Labs' open source and commercial products (including, but not limited to Grafana, Grafana Cloud, Grafana Enterprise, and grafana.com). We can accept only vulnerability reports at this address. We would prefer that you encrypt your message to us by using our PGP key. The key fingerprint is
F988 7BEA 027A 049F AE8E 5CAA D125 8932 BE24 C5CA
The key is available from keyserver.ubuntu.com.
Security announcements
We maintain a security category on our blog, where we will always post a summary, remediation, and mitigation details for any patch containing security fixes.
You can also subscribe to our RSS feed.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/grafana/grafana | ≥ 9.2.0&&< 9.2.10 | 9.2.10go get github.com/grafana/grafana@v9.2.10 |
| 🐹Go | github.com/grafana/grafana | ≥ 9.3.0&&< 9.3.4 | 9.3.4go get github.com/grafana/grafana@v9.3.4 |
Affected Products
grafanagrafanaDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/grafana/grafana, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/grafana/grafana to 9.2.10 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-7rqg-hjwc-6mjf is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
OpenShift Service Mesh containers include the grafana RPM from RHEL and consume CVE fixes for grafana from RHEL channels. The servicemesh-grafana RPM shipped in early versions of OpenShift Service Mesh 2.1 is no longer maintained.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Ceph Storage 5.3 | rhceph/rhceph-5-dashboard-rhel8:5-83 | RHSA-2024:0746 |
Frequently Asked Questions
Is GHSA-7rqg-hjwc-6mjf in your dependencies?
Find it across Go, including transitive dependencies.