cve.bz

CVE-2021-41174 grafana grafana: Cross-site Scripting

6.1 mediumEPSS 85%Fix available

Medium (6.1) in grafana grafana. EPSS 85% estimated probability of exploitation activity in the next 30 days. Fixed in @grafana/data 8.2.3.

On this page
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.

Severity

CVSS 3.1

6.1 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
85% (unchanged from 85% a week ago; 85% 30 days ago) estimated probability of exploitation activity in the next 30 days; 100th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-79 Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-41174 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-41174?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-41174?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-41174 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
grafana:grafanafrom 8.0.0 before 8.2.3

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-3j9m-hcv9-rpj8npm@grafana/data>=8.0.0 <8.2.38.2.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu16.04:LTSgrafanano fix listedUBUNTU-CVE-2021-41174
SUSEEnterprise Storage 6grafana8.5.13-150100.3.12.1SUSE-SU-2022:3676-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP3-BCL, Linux Enterprise Server 12 SP3-LTSS and 10 moregolang-github-prometheus-node_exporter1.3.0-1.15.3SUSE-SU-2022:2134-1
SUSELinux Enterprise Module for Package Hub 15 SP4grafana8.5.13-150200.3.29.5SUSE-SU-2022:4428-1
SUSEManager Client Tools 12golang-github-QubitProducts-exporter_exporter0.4.0-1.6.1SUSE-SU-2022:2134-1
SUSEManager Client Tools 12golang-github-boynux-squid_exporter1.6-1.9.1SUSE-SU-2022:4439-1
SUSEManager Client Tools 12golang-github-prometheus-alertmanager0.23.0-1.12.3SUSE-SU-2022:2134-1
SUSEManager Client Tools 12grafana8.3.5-1.30.3SUSE-SU-2022:2134-1
SUSEManager Client Tools 12grafana8.5.13-1.36.2SUSE-SU-2022:4439-1
SUSEManager Client Tools 12mgr-cfg4.3.6-1.27.4SUSE-SU-2022:2134-1
SUSEManager Client Tools 12mgr-custom-info4.3.3-1.18.1SUSE-SU-2022:2134-1
SUSEManager Client Tools 12mgr-daemon4.3.4-1.32.3SUSE-SU-2022:2134-1
SUSEManager Client Tools 12mgr-osad4.3.6-1.39.4SUSE-SU-2022:2134-1
75 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.3prometheus-postgres_exporter0.10.0-150000.1.3.1SUSE-SU-2022:1396-1
openSUSELeap 15.3rhnlib4.2.6-150000.3.34.1SUSE-SU-2022:1396-1
openSUSELeap 15.3spacecmd4.2.16-150000.3.77.1SUSE-SU-2022:1396-1
openSUSELeap 15.3, Leap 15.4dracut-saltboot0.1.1665997480.587fa10-150000.1.41.1SUSE-SU-2022:4437-1
openSUSELeap 15.3, Leap 15.4golang-github-boynux-squid_exporter1.6-150000.1.9.1SUSE-SU-2022:4437-1
openSUSELeap 15.3, Leap 15.4golang-github-prometheus-promu0.13.0-150000.3.9.1SUSE-SU-2022:4437-1
openSUSELeap 15.3, Leap 15.4grafana8.3.5-150200.3.21.1SUSE-FU-2022:1419-1
openSUSELeap 15.3, Leap 15.4grafana8.5.13-150200.3.29.5SUSE-SU-2022:4428-1
openSUSELeap 15.3, Leap 15.4spacecmd4.3.16-150000.3.89.1SUSE-SU-2022:4437-1
openSUSELeap 15.4prometheus-blackbox_exporter0.19.0-150000.1.14.3SUSE-SU-2022:4437-1
openSUSELeap 15.4wire0.5.0-150000.1.9.3SUSE-SU-2022:4437-1
openSUSETumbleweedgrafana8.3.4-1.1openSUSE-SU-2024:11816-1

From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This issue did not affect the versions of grafana as shipped with Red Hat Enterprise Linux 8 as they provide an older version that does not include the vulnerability.

ProductPackageStateAdvisory
OpenShift Service Mesh 2.0servicemesh-grafanaNot affected
OpenShift Service Mesh 2.1servicemesh-grafanaAffected
Red Hat Advanced Cluster Management for Kubernetes 2grafanaWill not fix
Red Hat Ceph Storage 2grafanaOut of support scope
Red Hat Ceph Storage 3grafanaOut of support scope
Red Hat Ceph Storage 3grafana-containerOut of support scope
Red Hat Ceph Storage 4rhceph/rhceph-4-dashboard-rhel8Not affected
Red Hat Ceph Storage 5rhceph/rhceph-5-dashboard-rhel8Not affected
Red Hat Enterprise Linux 8grafanaNot affected
Red Hat Enterprise Linux 9grafanaNot affected
Red Hat OpenShift Container Platform 3.11openshift3/grafanaNot affected
Red Hat OpenShift Container Platform 4openshift4/ose-grafanaNot affected
Red Hat Storage 3grafanaNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-41174.

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

Attack patterns (CAPEC)

  • CAPEC-63 Cross-Site Scripting (XSS) Likelihood: High · Severity: Very High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-209 XSS Using MIME Type Mismatch Severity: Medium
  • CAPEC-588 DOM-Based XSS Likelihood: High · Severity: Very High
  • CAPEC-591 Reflected XSS Likelihood: High · Severity: Very High
  • CAPEC-592 Stored XSS Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON