CVE-2024-12539: Elasticsearch Elasticsearch Incorrect Authorization Vulnerability Vulnerability
MODERATECVE-2024-12539 is a MODERATE elasticsearch incorrect authorization vulnerability vulnerability (CWE-863: Incorrect Authorization) affecting Elasticsearch libraries in the Maven ecosystem. The issue involves elasticsearch incorrect authorization vulnerability. Remediation is available by upgrading affected packages to version 8.16.2.
CVE-2024-12539 at a Glance
How to Fix CVE-2024-12539
To remediate this vulnerability, upgrade all affected Elasticsearch dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>8.16.2</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.elasticsearch
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2024-12539, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.elasticsearch
Analyze the terminal output to locate any version of Elasticsearch in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.16.2), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.elasticsearch command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Elasticsearch, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-12539 Affected Elasticsearch Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.elasticsearch:elasticsearch
|
Maven |
≥ 8.16.0
< 8.16.2
|
8.16.2
|
References
Frequently Asked Questions
What is CVE-2024-12539?
Which Elasticsearch versions are affected?
What version fixes CVE-2024-12539?
Is elasticsearch affected?
What CWE is associated with CVE-2024-12539?
How can I check Maven dependencies for CVE-2024-12539?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5mpw-4546-2wcr",
"modified" : "2024-12-17T22:30:17Z",
"published" : "2024-12-17T21:30:34Z",
"aliases" : [ "CVE-2024-12539" ],
"summary" : "Elasticsearch Incorrect Authorization vulnerability",
"details" : "An issue was discovered where improper authorization controls affected certain queries that could allow a malicious actor to circumvent Document Level Security in Elasticsearch and get access to documents that their roles would normally not allow.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.elasticsearch:elasticsearch"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.16.0"
}, {
"fixed" : "8.16.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-12539"
}, {
"type" : "WEB",
"url" : "https://discuss.elastic.co/t/elasticsearch-8-16-2-8-17-0-security-update/372091"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/elastic/elasticsearch"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-17T22:30:17Z",
"nvd_published_at" : "2024-12-17T21:15:07Z"
}
}