CVE-2021-41174: XSS vulnerability allowing arbitrary JavaScript execution
Vulnerability summary
CVE-2021-41174 is a medium (CVSS 6.9) vulnerability in grafana. EPSS estimates a 85.40% chance of exploitation in the next 30 days, higher than 99.7% of scored vulnerabilities.
Not severe (CVSS 6.9, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 10 · Related 10Timeline
- 03-11-2021PublishedVulnerability first disclosed.
- 04-08-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
5 scores · 4 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NDiffers
- OSV · NpmEcosystem advisory · calculated6.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:N
- NVDNIST6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NDiffers
EPSS trend
Probability
85.40%
Chance of exploitation in the next 30 days
Percentile
100%
Versus all other CVEs
30-day change
No change 0.00 pp
From 85.40% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
@grafana1 product
- data≥ 8.0.0, < 8.2.3
Grafana1 product
- grafana≥ 8.0.0, < 8.2.3
Ubuntu1 product
- grafanaAll versions (No fix recorded)
3 vendors · 3 products
References
10 links- github.com/grafana/grafana/security/advisories/GHSA-3j9m-hcv9-rpj8X Refsource CONFIRMWEBThird Party Advisory
- github.com/grafana/grafana/commit/31b78d51c693d828720a5b285107a50e6024c912X Refsource MISCWEBPatchThird Party Advisory
- github.com/grafana/grafana/commit/3cb5214fa45eb5a571fd70d6c6edf0d729983f82X Refsource MISCWEBPatchThird Party Advisory
- github.com/grafana/grafana/commit/fb85ed691290d211a5baa44d9a641ab137f0de88X Refsource MISCWEBPatchThird Party Advisory
- github.com/grafana/grafanaPACKAGE