CVE-2024-23451: Elasticsearch Elasticsearch Incorrect Authorization Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-r3hx-qfh5-r9m7
CVSS 4.4
CWE-863
Published
Advisory Summary

CVE-2024-23451 is a MODERATE (CVSS 4.4) 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.13.0.

CVE-2024-23451 at a Glance

CVE Identifier CVE-2024-23451
GHSA Identifier GHSA-r3hx-qfh5-r9m7
Severity MODERATE
CVSS v3.1 Base Score 4.4
CWE Classification CWE-863: Incorrect Authorization
Affected Product Elasticsearch
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 4.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-23451

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.

org.elasticsearch:elasticsearch fixed: 8.13.0
<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>8.13.0</version>
</dependency>
Verify Direct and Transitive Dependencies

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-23451, 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.13.0), 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

Incorrect Authorization issue exists in the API key based security model for Remote Cluster Security, which is currently in Beta, in Elasticsearch 8.10.0 and before 8.13.0. This allows a malicious user with a valid API key for a remote cluster configured to use the new Remote Cluster Security to read arbitrary documents from any index on the remote cluster, and only if they use the Elasticsearch custom transport protocol to issue requests with the target index ID, the shard ID and the document ID. None of Elasticsearch REST API endpoints are affected by this issue.

CVE-2024-23451 Affected Elasticsearch Versions

1 component(s)
Fixed Versions:
8.13.0
Product / Package Ecosystem Affected Versions Fixed Version
org.elasticsearch:elasticsearch
Maven
≥ 8.10.0
< 8.13.0
8.13.0

References

Frequently Asked Questions

What is CVE-2024-23451?
CVE-2024-23451 is a security vulnerability in Elasticsearch involving Elasticsearch Incorrect Authorization vulnerability under CWE-863: Incorrect Authorization.
Which Elasticsearch versions are affected?
Affected versions include releases prior to 8.13.0 across affected packages: org.elasticsearch:elasticsearch.
What version fixes CVE-2024-23451?
Upgrading to 8.13.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is elasticsearch affected?
Yes, org.elasticsearch:elasticsearch is affected in releases prior to 8.13.0. Upgrade your dependency to 8.13.0 or later.
What is the CVSS score of CVE-2024-23451?
CVE-2024-23451 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-23451?
CVE-2024-23451 is classified under CWE-863: Incorrect Authorization (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.).
How can I check Maven dependencies for CVE-2024-23451?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.elasticsearch'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r3hx-qfh5-r9m7",
  "modified" : "2024-03-27T21:56:03Z",
  "published" : "2024-03-27T18:32:39Z",
  "aliases" : [ "CVE-2024-23451" ],
  "summary" : "Elasticsearch Incorrect Authorization vulnerability",
  "details" : "Incorrect Authorization issue exists in the API key based security model for Remote Cluster Security, which is currently in Beta, in Elasticsearch 8.10.0 and before 8.13.0. This allows a malicious user with a valid API key for a remote cluster configured to use the new Remote Cluster Security to read arbitrary documents from any index on the remote cluster, and only if they use the Elasticsearch custom transport protocol to issue requests with the target index ID, the shard ID and the document ID. None of Elasticsearch REST API endpoints are affected by this issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.elasticsearch:elasticsearch"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.10.0"
      }, {
        "fixed" : "8.13.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-23451"
  }, {
    "type" : "WEB",
    "url" : "https://discuss.elastic.co/t/elasticsearch-8-13-0-security-update-esa-2024-07/356315"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/elastic/elasticsearch"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-27T21:56:03Z",
    "nvd_published_at" : "2024-03-27T18:15:10Z"
  }
}