# CVE-2023-22462: Stored XSS in Grafana Text plugin

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.4
- **CVSS:** 6.4 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: Low; User interaction: Required; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 1.09% (percentile 65, 2026-11-26)
- **CWE:** CWE-79
- **Aliases:** BIT-grafana-2023-22462, GHSA-7rqg-hjwc-6mjf
- **Published:** 2023-03-01T20:56:49.000Z
- **Modified:** 2026-09-10T03:49:52.753Z

## Who should check

- Projects that depend on Go package github.com/grafana/grafana (\>= 9.2.0, \< 9.2.10)
- Anyone running grafana \>= 9.2, \< 9.2.10; \>= 9.3, \< 9.3.4

## Description

Grafana is an open-source platform for monitoring and observability. 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. An attacker needs to have the Editor role in order to change a Text panel to include JavaScript. 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. This issue has been patched in versions 9.2.10 and 9.3.4.

## Affected and fixed versions

- Go `github.com/grafana/grafana`: affected \>= 9.2.0, \< 9.2.10; fixed 9.2.10, 9.3.4 (osv)
- grafana: \>= 9.2, \< 9.2.10; \>= 9.3, \< 9.3.4 (cvelist)

## Mitigation

- Upgrade github.com/grafana/grafana to one of 9.2.10, 9.3.4 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-22462. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-22462.md
Affected: github.com/grafana/grafana >= 9.2.0, < 9.2.10
Fixed in: 9.2.10, 9.3.4

Steps:
1. Search this machine and project for github.com/grafana/grafana (Go), grafana: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-22462 being exploited?

There is no confirmed exploitation: CVE-2023-22462 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.09% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-22462?

Medium: CVSS 6.4 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2023-22462?

github.com/grafana/grafana \>= 9.2.0, \< 9.2.10.

### Is there a fix for CVE-2023-22462?

Yes. Fixed in 9.2.10, 9.3.4. Upgrade github.com/grafana/grafana to one of 9.2.10, 9.3.4 (or later in the same release line).

### How do I check if I'm affected by CVE-2023-22462?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/grafana/grafana/security/advisories/GHSA-7rqg-hjwc-6mjf>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-22462>
- patch: <https://github.com/grafana/grafana/commit/db83d5f398caffe35c5846cfa7727d1a2a414165>
- patch: <https://grafana.com/blog/2023/02/28/grafana-security-release-new-versions-with-security-fixes-for-cve-2023-0594-cve-2023-0507-and-cve-2023-22462/>
- other: <https://security.netapp.com/advisory/ntap-20230413-0004/>
- other: <https://github.com/grafana/grafana>
- other: <https://grafana.com/blog/2023/02/28/grafana-security-release-new-versions-with-security-fixes-for-cve-2023-0594-cve-2023-0507-and-cve-2023-22462>
- other: <https://security.netapp.com/advisory/ntap-20230413-0004>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-22462>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-7rqg-hjwc-6mjf> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-22462> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-22462>
