{"id":"CVE-2021-41174","published":"2021-11-03T18:00:12Z","modified":"2024-08-04T02:59:31Z","title":"XSS vulnerability allowing arbitrary JavaScript execution","vendor":"grafana","product":"grafana","tier":"core","eol":null,"affectedVersions":[{"vendor":"grafana","product":"grafana","versions":[">= 8.0.0, < 8.2.3"]}],"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"Grafana, the open-source monitoring and observability platform, contains a cross-site scripting flaw in its AngularJS-rendered pages, where unvalidated input in the URL is evaluated as an AngularJS expression. An attacker who can get a victim to visit a crafted link that targets a page showing the menu bar login button can run arbitrary JavaScript in the victim's browser, provided the victim is unauthenticated and clicks the link.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T14:55:39Z"},"cvss":{"score":6.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.85404,"percentile":0.99726,"date":"2026-11-21","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2022-05-31","exploitedFirstSeen":"2022-05-31","ransomware":false,"evidence":[{"url":"https://unit42.paloaltonetworks.com/network-security-trends-cross-site-scripting/","date":"2022-05-31"}],"evidenceTotal":1,"provenance":"source"},"exploited":true,"otx":{"pulseCount":0,"pulses":[],"provenance":"machine"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/grafana/grafana/security/advisories/GHSA-3j9m-hcv9-rpj8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/grafana/grafana/commit/31b78d51c693d828720a5b285107a50e6024c912","tags":["x_refsource_MISC"]},{"url":"https://github.com/grafana/grafana/commit/3cb5214fa45eb5a571fd70d6c6edf0d729983f82","tags":["x_refsource_MISC"]},{"url":"https://github.com/grafana/grafana/commit/fb85ed691290d211a5baa44d9a641ab137f0de88","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20211125-0003/","tags":["x_refsource_CONFIRM"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"npm","package":"@grafana/data","vulnerableRanges":[">=8.0.0, <8.2.3"],"patched":["8.2.3"],"from":["GHSA-3j9m-hcv9-rpj8"],"provenance":"source"}],"advisories":[{"id":"GHSA-3j9m-hcv9-rpj8","url":"https://github.com/advisories/GHSA-3j9m-hcv9-rpj8","severity":"MODERATE","ecosystem":"npm","package":"@grafana/data","vulnerableRanges":[">=8.0.0, <8.2.3"],"patched":["8.2.3"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2021-2285","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2021-2285","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"nuclei":[{"id":"CVE-2021-41174","name":"Grafana 8.0.0 <= v.8.2.2 - Angularjs Rendering Cross-Site Scripting","severity":"medium","path":"http/cves/2021/CVE-2021-41174.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-41174.yaml"}],"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2021-11-03","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2021-41174","provenance":"source"},{"date":"2022-05-31","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://unit42.paloaltonetworks.com/network-security-trends-cross-site-scripting/","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":null,"daysToKev":null},"priority":{"score":64.8,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 1635 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.95,"detail":"percentile 0.9973"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 nuclei template"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":4.83,"detail":"base score 6.9"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}