CVE-2020-7014 Overview
CVE-2020-7014 is a privilege escalation vulnerability in Elasticsearch that was discovered as an incomplete fix for the earlier CVE-2020-7009. This vulnerability affects Elasticsearch versions from 6.7.0 to 6.8.7 and 7.0.0 to 7.6.1. An attacker who possesses the ability to create API keys and authentication tokens can exploit this flaw to generate authentication tokens with elevated privileges, potentially gaining unauthorized access to sensitive data and administrative functions within the Elasticsearch cluster.
Critical Impact
Authenticated attackers can escalate their privileges by manipulating API key and authentication token generation, potentially gaining full administrative control over Elasticsearch clusters containing sensitive data.
Affected Products
- Elastic Elasticsearch versions 6.7.0 through 6.8.7
- Elastic Elasticsearch versions 7.0.0 through 7.6.1
Discovery Timeline
- June 3, 2020 - CVE-2020-7014 published to NVD
- November 21, 2024 - Last updated in NVD database
Technical Details for CVE-2020-7014
Vulnerability Analysis
This privilege escalation vulnerability stems from an incomplete remediation of CVE-2020-7009. The security fix implemented for the original vulnerability failed to address all attack vectors, leaving a pathway for authenticated users to elevate their privileges within Elasticsearch clusters.
The vulnerability is classified under CWE-266 (Incorrect Privilege Assignment) and CWE-269 (Improper Privilege Management), indicating fundamental issues in how Elasticsearch handles privilege assignments during the API key and authentication token generation workflow. An attacker with low-privilege access who can create API keys and authentication tokens can manipulate this process to obtain tokens with higher privileges than intended.
The attack is network-accessible and requires low complexity to execute once an attacker has initial authenticated access to the system. No user interaction is required, making this particularly dangerous in multi-tenant environments where users may have limited privileges.
Root Cause
The root cause lies in the incomplete implementation of security controls during the authentication token generation process when combined with API key creation. The original fix for CVE-2020-7009 did not fully validate privilege boundaries during the token generation workflow, allowing privilege assignments to be manipulated through a specific sequence of API calls.
The vulnerability exists in the security subsystem responsible for managing API keys and authentication tokens, where insufficient validation allows the creation of tokens with privileges exceeding those of the requesting user.
Attack Vector
The attack requires an authenticated user with the ability to create API keys and authentication tokens. The attacker performs a series of specific steps involving both API key generation and authentication token creation. Through this sequence of operations, the attacker can manipulate the privilege assignment process to generate an authentication token that carries elevated privileges beyond what the attacker's original credentials should allow.
This attack vector is particularly concerning in environments where:
- Multiple users have access to create API keys
- Elasticsearch is exposed to networks with potentially untrusted authenticated users
- Role-based access control is relied upon to restrict sensitive operations
The attack does not require exploitation of any external components and can be performed entirely through legitimate Elasticsearch API endpoints, making it difficult to distinguish from normal operations without proper monitoring.
Detection Methods for CVE-2020-7014
Indicators of Compromise
- Unusual API key creation activity from low-privilege user accounts
- Authentication tokens being generated with privileges inconsistent with the requesting user's role
- Unexpected privilege escalation events in Elasticsearch audit logs
- Anomalous sequences of API key and token generation requests from single sessions
Detection Strategies
- Enable and monitor Elasticsearch audit logging for all security-related API calls
- Implement alerting on API key creation events, especially from non-administrative accounts
- Monitor for authentication token generation patterns that deviate from established baselines
- Review user privilege assignments and compare against actual token privileges being generated
Monitoring Recommendations
- Deploy SentinelOne Singularity Platform to monitor Elasticsearch nodes for suspicious privilege-related activities
- Configure centralized logging to capture all Elasticsearch security audit events
- Establish baseline patterns for API key and token generation to identify anomalies
- Implement real-time alerting for any privilege escalation indicators within Elasticsearch clusters
How to Mitigate CVE-2020-7014
Immediate Actions Required
- Upgrade Elasticsearch to version 6.8.8 or later for the 6.x branch
- Upgrade Elasticsearch to version 7.6.2 or later for the 7.x branch
- Review and audit all existing API keys and authentication tokens for unexpected privileges
- Restrict API key creation capabilities to only trusted administrative users
Patch Information
Elastic has released security patches addressing this vulnerability. Organizations should upgrade to patched versions immediately. For detailed patch information and security guidance, refer to the Elastic Community Security Resources page. Additional context is available in the NetApp Security Advisory NTAP-20200619-0003.
Workarounds
- Disable API key creation for non-essential users by adjusting cluster role permissions
- Implement network segmentation to limit access to Elasticsearch API endpoints
- Use external authentication providers with strict privilege controls
- Monitor and restrict the manage_api_key cluster privilege to only necessary accounts
# Example: Restrict API key privileges in elasticsearch.yml
# Ensure only trusted roles can create API keys
xpack.security.authc.api_key.enabled: true
# Enable audit logging for security events
xpack.security.audit.enabled: true
xpack.security.audit.outputs: [ index, logfile ]
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


