{"answers":{"affected":"3 open source packages ship an affected version, including @grafana/data and grafana. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-41174 exists.","fix":"Upgrade @grafana/data to 8.2.3 or later.","what":"CVE-2021-41174 is a medium-severity cross-site scripting vulnerability in Grafana Grafana, published on 3 Nov 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-41174 and fix it if it is affected.\n\nWhat it is: CVE-2021-41174 is a medium-severity cross-site scripting vulnerability in Grafana Grafana, published on 3 Nov 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-41174 exists.\n\nAffected packages and fixed versions:\n- @grafana/data (npm): affected from 8.0.0; fixed in 8.2.3\n- @grafana/data (npm): affected from 8.0.0; fixed in 8.2.3\n- grafana (Bitnami): affected from 8.0.0; fixed in 8.2.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-41174/ (Markdown: https://insights.sbomify.com/CVE-2021-41174/index.md)","id":"CVE-2021-41174","markdown":"https://insights.sbomify.com/CVE-2021-41174/index.md","name":"CVE-2021-41174","record":{"aliases":["BIT-grafana-2021-41174","GHSA-3j9m-hcv9-rpj8","UBUNTU-CVE-2021-41174"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"Grafana monitoring platform","requires_auth":"none","summary":"Attackers can execute arbitrary JavaScript in victims' browsers via crafted URLs, potentially leading to account takeover.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"grafana","vendor":"grafana"}],"cvss":{"score":6.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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.","ecosystems":["Bitnami","npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":1,"refs":[{"date":null,"kind":"nuclei","ref":"http/cves/2021/CVE-2021-41174.yaml","stars":null,"title":"Grafana 8.0.0 \u003c= v.8.2.2 - Angularjs Rendering Cross-Site Scripting"}],"tier":"weaponised"},"has_fix":true,"headline":"XSS vulnerability allowing arbitrary JavaScript execution","id":"CVE-2021-41174","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"grafana:grafana","products":["grafana:grafana"],"type":"xss","year":"2021"},"n_packages":3,"n_references":5,"next":{"headline":"Stored XSS in Client Groups Management (Authenticated)","id":"CVE-2021-41175"},"packages":[{"ecosystem":"Bitnami","fixed":["8.2.3"],"introduced":["8.0.0"],"last_affected":[],"package":"grafana","purl":"pkg:bitnami/grafana","source":"BIT-grafana-2021-41174"},{"ecosystem":"npm","fixed":["8.2.3"],"introduced":["8.0.0"],"last_affected":[],"package":"@grafana/data","purl":null,"source":"GHSA-3j9m-hcv9-rpj8"},{"ecosystem":"npm","fixed":["8.2.3"],"introduced":["8.0.0"],"last_affected":[],"package":"@grafana/data","purl":"pkg:npm/%40grafana/data","source":"GHSA-3j9m-hcv9-rpj8"}],"prev":{"headline":"DoS via maliciously crafted p2p message","id":"CVE-2021-41173"},"products":["grafana"],"published":"2021-11-03","related":[{"cvss_score":7.5,"headline":"Grafana Path Traversal","id":"CVE-2021-43798","kev_date_added":"2025-10-09","published":"2021-12-07"},{"cvss_score":10,"headline":"Incorrect privilege assignment","id":"CVE-2025-41115","kev_date_added":null,"published":"2025-11-21"},{"cvss_score":9.8,"headline":"Grafana vulnerable to race condition allowing privilege escalation","id":"CVE-2022-39328","kev_date_added":null,"published":"2022-11-08"},{"cvss_score":9.8,"headline":"Auth bypass in n/a","id":"CVE-2022-28660","kev_date_added":null,"published":"2022-05-20"},{"cvss_score":9.8,"headline":"Information disclosure in n/a","id":"CVE-2022-26148","kev_date_added":null,"published":"2022-03-21"},{"cvss_score":9.8,"headline":"Grafana Authentication Bypass","id":"CVE-2018-15727","kev_date_added":null,"published":"2018-08-29"},{"cvss_score":9.4,"headline":"Grafana SQL Expressions allow for remote code execution","id":"CVE-2024-9264","kev_date_added":null,"published":"2024-10-18"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["grafana"]},"summary":"Attackers can execute arbitrary JavaScript in victims' browsers via crafted URLs, potentially leading to account takeover.","url":"https://insights.sbomify.com/CVE-2021-41174/"}