Cross-Site Scripting (XSS) in @grafana/data (CVE-2021-41174)
Summary
Cross-site scripting in @grafana/data (CVE-2021-41174). Data can be tampered with by attackers. Exploitable via path. Mitigation: upgrade to 8.2.3 or later.
Original description
The description as published by the source.
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.
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2021-41174 has been found in @grafana/data.
Attackers can target a specific entry point like path over the network to misuse the product.
Data can be tampered with by attackers.
What to do: upgrade @grafana/data to 8.2.3 or later.
If unsure, ask your IT team or search "@grafana/data CVE-2021-41174" on the vendor's site.
CVE-2021-41174 (@grafana/data) — CWE-79
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: path
Patched: 8.2.3 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Cross-site scripting (XSS) (CWE-79) exists in @grafana/data. Attackers reach the vulnerable code path via path without authentication.
Check the vendor advisory for the affected versions of @grafana/data. Attack surface: path.
Severity: ?. Data can be tampered with by attackers.
Update to 8.2.3.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r '@grafana/data' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r '@grafana/data' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
@grafana/dataを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade @grafana/data to 8.2.3ステージング環境で 8.2.3 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory github.com
- advisory github.com
- advisory github.com
- advisory github.com
- advisory security.netapp.com
- package github.com
- web nvd.nist.gov
- web security.netapp.com