CVE-2020-11110 Overview
CVE-2020-11110 is a stored Cross-Site Scripting (XSS) vulnerability affecting Grafana through version 6.7.1. The vulnerability exists due to insufficient input protection in the originalUrl field, which allows an attacker to inject malicious JavaScript code. This code executes when a victim clicks on "Open Original Dashboard" after visiting a crafted snapshot, potentially leading to session hijacking, credential theft, or unauthorized actions performed on behalf of the victim.
Critical Impact
Attackers can inject persistent JavaScript code that executes in the context of authenticated user sessions, potentially compromising sensitive monitoring data and administrative access to Grafana instances.
Affected Products
- Grafana versions through 6.7.1
- NetApp E-Series Performance Analyzer
Discovery Timeline
- 2020-07-27 - CVE-2020-11110 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2020-11110
Vulnerability Analysis
This stored XSS vulnerability (CWE-79) stems from inadequate sanitization of user-controlled input in Grafana's snapshot functionality. Grafana allows users to create dashboard snapshots that can be shared with others. When creating or viewing these snapshots, the originalUrl field captures the source dashboard URL. However, the application fails to properly sanitize this field before rendering it in the user interface.
The vulnerability requires low privileges to exploit, meaning an authenticated user with basic access can craft a malicious snapshot. The attack requires user interaction—specifically, the victim must visit the malicious snapshot and click on the "Open Original Dashboard" link. When triggered, the injected JavaScript executes within the victim's browser session, potentially accessing cookies, session tokens, and other sensitive data associated with the Grafana instance.
Root Cause
The root cause of this vulnerability is insufficient input validation and output encoding in the Grafana snapshot handling code. The originalUrl field accepts user input that is later rendered in the web interface without proper HTML entity encoding or JavaScript escaping. This allows attackers to embed script tags or JavaScript event handlers that execute when the content is rendered in a victim's browser.
Attack Vector
The attack follows a network-based vector where an authenticated attacker creates a crafted dashboard snapshot containing malicious JavaScript in the originalUrl field. The attacker then shares or distributes the link to this snapshot. When victims with active Grafana sessions view the snapshot and interact with the "Open Original Dashboard" functionality, the injected script executes in their browser context.
The vulnerability mechanism involves crafting a snapshot with JavaScript payload embedded in the originalUrl parameter. When the snapshot is rendered and a user clicks on "Open Original Dashboard," the unsanitized URL triggers script execution. For detailed technical analysis, refer to the GitHub Grafana Changelog.
Detection Methods for CVE-2020-11110
Indicators of Compromise
- Unusual or suspicious JavaScript code patterns in dashboard snapshot originalUrl fields
- Snapshots containing HTML tags such as <script>, <img onerror>, or similar injection vectors
- Unexpected network requests originating from Grafana dashboard pages to external domains
- User reports of unexpected behavior or pop-ups when viewing dashboard snapshots
Detection Strategies
- Implement web application firewall (WAF) rules to detect XSS patterns in Grafana snapshot requests
- Monitor Grafana application logs for snapshot creation events with unusually long or encoded URLs
- Deploy browser-based XSS detection tools that can identify malicious script execution attempts
- Conduct periodic security audits of stored snapshot data to identify potential malicious payloads
Monitoring Recommendations
- Enable detailed logging for snapshot creation and access events in Grafana
- Configure alerting for Content Security Policy (CSP) violations that may indicate XSS attempts
- Monitor for unusual patterns in snapshot sharing or viewing activity
- Implement user behavior analytics to detect anomalous access to snapshot functionality
How to Mitigate CVE-2020-11110
Immediate Actions Required
- Upgrade Grafana to version 6.7.2 or later immediately
- Review existing dashboard snapshots for potentially malicious content in the originalUrl field
- Consider temporarily disabling snapshot functionality if immediate patching is not possible
- Implement Content Security Policy (CSP) headers to mitigate XSS impact
Patch Information
Grafana has addressed this vulnerability in versions released after 6.7.1. Organizations should upgrade to the latest stable version of Grafana to receive this security fix along with other security improvements. Detailed patch information is available in the GitHub Grafana Changelog. NetApp customers should also consult the NetApp Security Advisory for guidance on affected E-Series Performance Analyzer deployments.
Workarounds
- Implement a reverse proxy with XSS filtering capabilities in front of Grafana instances
- Deploy Content Security Policy headers with strict script-src directives to limit script execution
- Restrict snapshot creation permissions to trusted administrators only
- Consider disabling the snapshot feature entirely if it is not required for business operations
- Regularly audit and purge old or unnecessary dashboard snapshots
# Example Content Security Policy header configuration for nginx
# Add to your Grafana server configuration
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; frame-ancestors 'self';" always;
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


