Cloudanix VulnDB

CVE-2024-37280

Medium · 4.9

CVSS

4.9

EPSS

0.6%

Published

Jun 13, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A bug in how Elasticsearch handles certain experimental index settings can cause the service to crash when new data is added, temporarily stopping search and logging functions.

Exploitation
Remote Authenticated
Attacker needs
High Privilege
Complexity
Low
Impact
Denial Of Service
Component
Application
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Ingestion of documents against an index template using an experimental dynamic 'passthrough' field mapping triggers an unbounded recursion that throws a StackOverflowError, crashing the ingest thread and rendering the node unavailable for further indexing or search operations.

Why it matters to the business

Elasticsearch clusters become intermittently or fully unavailable for data ingestion and queries, disrupting log analytics, observability, and search workloads until the affected node is restarted or the cluster is scaled.

How an attack unfolds

An attacker with index privileges creates or modifies an index template containing a passthrough dynamic mapping, then submits specially crafted documents that exercise the mapping path; the resulting recursion exhausts the stack and produces a denial of service.

How to fix it

Upgrade Elasticsearch to a build containing commit 8d96bbe3bf5fed931f3119733895458eab75dca9 or a later release that disables or corrects the passthrough mapping recursion; until patched, avoid using passthrough mappings in any index templates.

How to confirm the fix worked

Confirm the running Elasticsearch version includes commit 8d96bbe3bf5fed931f3119733895458eab75dca9; attempt document ingestion against a test index template that uses a passthrough mapping and verify no StackOverflowError occurs.

Typical attack path

  1. Obtain privileges sufficient to manage index templates and ingest documents
  2. Create or update an index template that declares a dynamic field of type passthrough
  3. Submit document batches that trigger the passthrough mapping logic during ingestion
  4. Observe StackOverflowError in logs and subsequent node or cluster unavailability

How to detect it

Search Elasticsearch and application logs for repeated StackOverflowError exceptions occurring during document ingestion or template application; correlate with spikes in failed bulk indexing requests.

  • StackOverflowError
  • passthrough
  • dynamic field mapping

What your security team should do

  • Immediately upgrade all Elasticsearch instances to a build containing the referenced fix commit
  • Audit existing index templates and remove any experimental passthrough dynamic mappings
  • Implement ingest pipeline validation rules that reject templates containing passthrough fields until the patch is deployed
  • Monitor for StackOverflowError events in Elasticsearch logs as a temporary detection control

The record

A flaw was discovered in Elasticsearch, affecting document ingestion when an index template contains a dynamic field mapping of “passthrough” type. Under certain circumstances, ingesting documents in this index would cause a StackOverflow exception to be thrown and ultimately lead to a Denial of Service. Note that passthrough fields is an experimental feature.

Affected packages

Ecosystem Package Introduced Fixed
Maven org.elasticsearch:elasticsearch 8.13.1 8.14.0
Bitnami elasticsearch 8.13.1 8.14.0
Chainguard elasticsearch-8 0 8.14.1-r0
Chainguard elasticsearch-8-bitnami 0 8.14.1-r0
Chainguard elasticsearch-8-config 0 8.14.1-r0
Chainguard elasticsearch-8-iamguarded 0 8.14.1-r0
Chainguard elasticsearch-config 0 8.14.1-r0
Chainguard elasticsearch-fips-8 0 8.14.1-r0
Chainguard elasticsearch-fips-8-bitnami 0 8.14.1-r0
Chainguard elasticsearch-fips-8-config 0 8.14.1-r0
Chainguard elasticsearch-fips-8-policy-140-2 0 8.14.1-r0
Chainguard elasticsearch-fips-8-policy-140-3 0 8.14.1-r0
Chainguard sonarqube 0 25.10.0.114319-r0
Chainguard sonarqube-10 0 25.3.0.104237-r0
Chainguard sonarqube-10-docker-compat 0 25.3.0.104237-r0
Chainguard sonarqube-10-scripts 0 25.3.0.104237-r0
Chainguard sonarqube-docker-compat 0 25.10.0.114319-r0
Chainguard sonarqube-scripts 0 25.10.0.114319-r0
Ubuntu:16.04:LTS elasticsearch 0 No fix
Ubuntu:Pro:16.04:LTS elasticsearch 0 No fix
Wolfi sonarqube 0 25.10.0.114319-r0
Wolfi sonarqube-10 0 25.3.0.104237-r0
Wolfi sonarqube-10-docker-compat 0 25.3.0.104237-r0
Wolfi sonarqube-10-scripts 0 25.3.0.104237-r0
Wolfi sonarqube-docker-compat 0 25.10.0.114319-r0
Wolfi sonarqube-scripts 0 25.10.0.114319-r0
maven org.elasticsearch/elasticsearch 8.13.1 8.14.0

Related vulnerabilities