CVE-2020-7013 Overview
CVE-2020-7013 is a prototype pollution vulnerability affecting Kibana versions before 6.8.9 and 7.7.0. The flaw exists within the Time Series Visual Builder (TSVB) component, where an authenticated attacker with privileges to create TSVB visualizations can insert malicious data that causes Kibana to execute arbitrary code. Successful exploitation could allow an attacker to execute code with the permissions of the Kibana process on the host system.
Critical Impact
Authenticated attackers can achieve remote code execution on Kibana servers through prototype pollution in the TSVB visualization component, potentially compromising the entire Elastic Stack deployment.
Affected Products
- Elastic Kibana versions prior to 6.8.9
- Elastic Kibana versions prior to 7.7.0
- Red Hat OpenShift Container Platform 3.11
- Red Hat OpenShift Container Platform 4.0
Discovery Timeline
- 2020-06-03 - CVE-2020-7013 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2020-7013
Vulnerability Analysis
This vulnerability is classified as a Code Injection flaw (CWE-94) that stems from improper handling of object prototypes within Kibana's Time Series Visual Builder functionality. Prototype pollution is a JavaScript-specific vulnerability that allows attackers to modify the prototype of base objects, which can lead to unexpected behavior across the entire application.
In the context of Kibana, the TSVB component processes user-supplied visualization data without adequate sanitization. When an authenticated user with visualization creation privileges crafts malicious input, they can pollute the JavaScript object prototype chain. This pollution can then be leveraged to inject arbitrary code that executes within the context of the Kibana Node.js process.
The attack requires authentication and specific privileges (ability to create TSVB visualizations), which limits the attack surface somewhat. However, in environments where multiple users have dashboard creation capabilities, or where user accounts have been compromised, this vulnerability presents a significant risk.
Root Cause
The root cause of CVE-2020-7013 lies in insufficient input validation and sanitization within the TSVB visualization processing logic. When user-controlled data is merged or assigned to JavaScript objects without proper prototype chain isolation, attackers can inject properties like __proto__ or constructor.prototype that modify the behavior of all objects inheriting from the polluted prototype.
Kibana's visualization engine failed to implement defensive measures such as:
- Object freezing or sealing
- Prototype-less object creation using Object.create(null)
- Input sanitization that strips dangerous properties
Attack Vector
The attack is network-based and requires an authenticated session with privileges to create TSVB visualizations. An attacker would:
- Authenticate to Kibana with valid credentials
- Navigate to the TSVB visualization creation interface
- Craft a malicious visualization payload containing prototype pollution gadgets
- Submit the payload, which pollutes the JavaScript prototype chain
- Trigger code execution through the polluted objects
The exploitation does not require user interaction beyond the attacker's own actions, making it a direct attack vector once authentication is achieved. The attacker's code executes with the same privileges as the Kibana process, which may include access to Elasticsearch indices, configuration files, and potentially the underlying operating system.
Detection Methods for CVE-2020-7013
Indicators of Compromise
- Unusual TSVB visualization creation activity, especially from unexpected user accounts
- Kibana process spawning child processes or making unexpected network connections
- Presence of suspicious properties like __proto__ or constructor.prototype in visualization configurations
- Unexpected modifications to system files or creation of new files by the Kibana process
Detection Strategies
- Monitor Kibana audit logs for visualization creation events with anomalous payloads
- Implement application-layer inspection to detect prototype pollution patterns in HTTP requests
- Deploy runtime application self-protection (RASP) solutions that can detect prototype manipulation attempts
- Use SentinelOne Singularity XDR to monitor for suspicious process behavior from the Kibana service
Monitoring Recommendations
- Enable detailed Kibana audit logging to capture all visualization creation and modification events
- Configure alerting for any Kibana process activity that deviates from baseline behavior
- Monitor for outbound network connections from the Kibana server to unexpected destinations
- Review user privilege assignments to ensure only trusted users can create TSVB visualizations
How to Mitigate CVE-2020-7013
Immediate Actions Required
- Upgrade Kibana to version 6.8.9 or later (for 6.x deployments) or version 7.7.0 or later (for 7.x deployments)
- Audit user accounts with TSVB visualization creation privileges and remove unnecessary access
- Review existing TSVB visualizations for suspicious configurations
- Implement network segmentation to limit the blast radius of potential compromise
Patch Information
Elastic has released security patches in Kibana versions 6.8.9 and 7.7.0 that address this prototype pollution vulnerability. The patches implement proper input sanitization and prototype chain isolation for TSVB visualization data processing. Organizations should update to the latest available version within their major release branch. For detailed patch information, refer to the Elastic Security Community page.
Workarounds
- Restrict TSVB visualization creation privileges to only trusted administrators until patches can be applied
- Deploy a web application firewall (WAF) with rules to detect and block prototype pollution payloads
- Consider temporarily disabling the TSVB feature if it is not critical to operations
- Implement strict network egress controls for the Kibana server to limit post-exploitation capabilities
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


