# CVE-2021-41174: XSS vulnerability allowing arbitrary JavaScript execution

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

- **Severity:** MEDIUM 6.9
- **CVSS:** 6.9 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: Low; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 85.40% (percentile 100, 2026-11-26)
- **CWE:** CWE-79
- **Aliases:** BIT-grafana-2021-41174, GHSA-3j9m-hcv9-rpj8
- **Published:** 2021-11-03T18:00:12.000Z
- **Modified:** 2026-07-08T06:29:58.986Z

## Who should check

- Projects that depend on npm package @grafana/data (\>= 8.0.0, \< 8.2.3)
- Anyone running grafana \>= 8.0.0, \< 8.2.3

## Description

Grafana is an open-source platform for monitoring and observability. In affected versions if an attacker is able to convince a victim to visit a URL referencing a vulnerable page, arbitrary JavaScript content may be executed within the context of the victim's browser. The user visiting the malicious link must be unauthenticated and the link must be for a page that contains the login button in the menu bar. The url has to be crafted to exploit AngularJS rendering and contain the interpolation binding for AngularJS expressions. AngularJS uses double curly braces for interpolation binding: {{ }} ex: {{constructor.constructor(‘alert(1)’)()}}. When the user follows the link and the page renders, the login button will contain the original link with a query parameter to force a redirect to the login page. The URL is not validated and the AngularJS rendering engine will execute the JavaScript expression contained in the URL. Users are advised to upgrade as soon as possible. If for some reason you cannot upgrade, you can use a reverse proxy or similar to block access to block the literal string {{ in the path.

## Affected and fixed versions

- npm `@grafana/data`: affected \>= 8.0.0, \< 8.2.3; fixed 8.2.3 (osv)
- grafana: \>= 8.0.0, \< 8.2.3 (cvelist)

## Mitigation

- Upgrade @grafana/data to 8.2.3 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2021-41174.md
Affected: @grafana/data >= 8.0.0, < 8.2.3
Fixed in: 8.2.3

Steps:
1. Search this machine and project for @grafana/data (npm), 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-2021-41174 being exploited?

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

### How serious is CVE-2021-41174?

Medium: CVSS 6.9 (v3.1, scored by CNA). Remote, no 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-2021-41174?

@grafana/data \>= 8.0.0, \< 8.2.3.

### Is there a fix for CVE-2021-41174?

Yes. Fixed in 8.2.3. Upgrade @grafana/data to 8.2.3 or later.

### How do I check if I'm affected by CVE-2021-41174?

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-3j9m-hcv9-rpj8>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-41174>
- patch: <https://github.com/grafana/grafana/commit/31b78d51c693d828720a5b285107a50e6024c912>
- patch: <https://github.com/grafana/grafana/commit/3cb5214fa45eb5a571fd70d6c6edf0d729983f82>
- patch: <https://github.com/grafana/grafana/commit/fb85ed691290d211a5baa44d9a641ab137f0de88>
- other: <https://security.netapp.com/advisory/ntap-20211125-0003/>
- other: <https://github.com/grafana/grafana>
- other: <https://security.netapp.com/advisory/ntap-20211125-0003>

## 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-2021-41174>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-3j9m-hcv9-rpj8> (license: <https://creativecommons.org/licenses/by/4.0/>)

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