CVE-2021-41174XSS vulnerability allowing arbitrary JavaScript execution
- 6.9MediumCVSS base score
- 85.4%Exploitation in 30 daysEPSS · top 0.3% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- 1Public exploitsMetasploit, Nuclei and Exploit-DB
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. The public collections list a Nuclei template for it.
Show the exploits1
Nuclei templates1 template
- Grafana 8.0.0 <= v.8.2.2 - Angularjs Rendering Cross-Site Scripting (Nuclei template) (opens in a new tab)
http/cves/2021/CVE-2021-41174.yamlSeverity medium
Modules, templates and exploits as listed by the Metasploit Framework (BSD-3-Clause), ProjectDiscovery's Nuclei templates (MIT) and the Exploit Database (GPLv2), read once a day. Where the data comes from
Timeline
ID reserved
By GitHub_M
- 49 days later
· 49 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium6.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:N |
| NVDNVD · Modified | 3.1 | Medium6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
- EPSS (exploitation in 30 days)
- 85.4% · top 0.3% of all CVEs (17 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.9.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- npm@grafana/dataGHSA-3j9m-hcv9-rpj8 (opens in a new tab)
References
References5
- https://github.com/grafana/grafana/security/advisories/GHSA-3j9m-hcv9-rpj8 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/grafana/grafana/commit/31b78d51c693d828720a5b285107a50e6024c912 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/grafana/grafana/commit/3cb5214fa45eb5a571fd70d6c6edf0d729983f82 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/grafana/grafana/commit/fb85ed691290d211a5baa44d9a641ab137f0de88 (opens in a new tab)x_refsource_MISCx_transferred
- https://security.netapp.com/advisory/ntap-20211125-0003/ (opens in a new tab)x_refsource_CONFIRMx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-2285 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-3j9m-hcv9-rpj8 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-41174)Record last updated .