CVE-2023-46674: Elasticsearch hadoop Elasticsearch-hadoop Unsafe Deserialization Vulnerability

MODERATE
Advisory Identifier: GHSA-rv74-m283-5j95
CVSS 6.0
CWE-502
Published
Advisory Summary

CVE-2023-46674 is a MODERATE (CVSS 6.0) elasticsearch-hadoop unsafe deserialization vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Elasticsearch hadoop libraries in the Maven ecosystem. The issue involves elasticsearch-hadoop unsafe deserialization. Remediation is available by upgrading affected packages to version 7.17.11, 8.9.0.

CVE-2023-46674 at a Glance

CVE Identifier CVE-2023-46674
GHSA Identifier GHSA-rv74-m283-5j95
Severity MODERATE
CVSS v3.1 Base Score 6.0
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Elasticsearch hadoop
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.0

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

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

How to Fix CVE-2023-46674

To remediate this vulnerability, upgrade all affected Elasticsearch hadoop 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-hadoop fixed: 7.17.11
<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch-hadoop</artifactId>
    <version>7.17.11</version>
</dependency>
org.elasticsearch:elasticsearch-hadoop fixed: 8.9.0
<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch-hadoop</artifactId>
    <version>8.9.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-2023-46674, 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 hadoop in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.17.11), 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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Elasticsearch hadoop, 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

An issue was identified that allowed the unsafe deserialization of java objects from hadoop or spark configuration properties that could have been modified by authenticated users. Elastic would like to thank Yakov Shafranovich, with Amazon Web Services for reporting this issue.

CVE-2023-46674 Affected Elasticsearch hadoop Versions

2 component(s)
Fixed Versions:
7.17.118.9.0
Product / Package Ecosystem Affected Versions Fixed Version
org.elasticsearch:elasticsearch-hadoop
Maven
< 7.17.11
7.17.11
org.elasticsearch:elasticsearch-hadoop
Maven
< 8.9.0
≥ 8.0.0
8.9.0

References

Frequently Asked Questions

What is CVE-2023-46674?
CVE-2023-46674 is a security vulnerability in Elasticsearch hadoop involving Elasticsearch-hadoop Unsafe Deserialization under CWE-502: Deserialization of Untrusted Data.
Which Elasticsearch hadoop versions are affected?
Affected versions include releases prior to 7.17.11, 8.9.0 across affected packages: org.elasticsearch:elasticsearch-hadoop.
What version fixes CVE-2023-46674?
Upgrading to 7.17.11, 8.9.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is elasticsearch-hadoop affected?
Yes, org.elasticsearch:elasticsearch-hadoop is affected in releases prior to 7.17.11, 8.9.0. Upgrade your dependency to 7.17.11, 8.9.0 or later.
What is the CVSS score of CVE-2023-46674?
CVE-2023-46674 has a CVSS v3.1 base score of 6.0 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:H/A:H.
What CWE is associated with CVE-2023-46674?
CVE-2023-46674 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Maven dependencies for CVE-2023-46674?
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-rv74-m283-5j95",
  "modified" : "2023-12-13T13:33:04Z",
  "published" : "2023-12-05T18:30:23Z",
  "aliases" : [ "CVE-2023-46674" ],
  "summary" : "Elasticsearch-hadoop Unsafe Deserialization",
  "details" : "An issue was identified that allowed the unsafe deserialization of java objects from hadoop or spark configuration properties that could have been modified by authenticated users. Elastic would like to thank Yakov Shafranovich, with Amazon Web Services for reporting this issue.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.elasticsearch:elasticsearch-hadoop"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.17.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.elasticsearch:elasticsearch-hadoop"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.9.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-46674"
  }, {
    "type" : "WEB",
    "url" : "https://discuss.elastic.co/t/elasticsearch-hadoop-7-17-11-8-9-0-security-update-esa-2023-28/348663"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/elastic/elasticsearch-hadoop"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-13T13:33:04Z",
    "nvd_published_at" : "2023-12-05T18:15:12Z"
  }
}