CVE-2024-23444
Medium · 4.9CVSS
4.9
EPSS
0.2%
Published
Jul 31, 2024
CISA due date
—
Cloudanix analysis
A command-line tool meant to create secure certificates for Elasticsearch left the secret key sitting unprotected on the computer even when told to protect it with a password.
- Exploitation
- Requires User Interaction
- Attacker needs
- High Privilege
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Application
- Class
- Cryptographic Weakness
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The elasticsearch-certutil CLI tool writes the private key generated during CSR creation to disk in plaintext, ignoring the --pass flag intended to encrypt it.
Why it matters to the business
Organizations using the tool may have private keys exposed on disk, increasing risk of unauthorized decryption of TLS traffic or access to protected Elasticsearch data if storage is later compromised.
How an attack unfolds
An attacker with access to the filesystem where the certutil tool runs can retrieve the unencrypted private key file left behind after an administrator invokes the csr option, even when --pass was supplied.
How to fix it
Upgrade elasticsearch to the version containing commit 09df99393193b2c53d92899662a8b8b3c55b45cd or later; after upgrade, regenerate any keys previously created with the affected certutil command and ensure they are properly encrypted.
How to confirm the fix worked
Confirm the elasticsearch version includes the referenced commit; re-run the certutil csr command with --pass and verify the resulting key file is encrypted (e.g., begins with a PKCS#8 encrypted header).
Typical attack path
- Administrator runs elasticsearch-certutil csr with --pass to generate a new key and CSR.
- Tool stores the private key file unencrypted on disk despite the encryption flag.
- Attacker obtains local or remote filesystem access and locates the plaintext key file.
- Attacker uses the recovered private key to decrypt TLS sessions or impersonate the Elasticsearch node.
How to detect it
Search filesystem audit logs and process execution history for invocations of elasticsearch-certutil with the csr option; inspect directories where keys are written for files lacking encryption headers.
What your security team should do
- Immediately upgrade all Elasticsearch instances to the fixed commit.
- Audit systems for any keys previously generated with the csr option and replace them.
- Restrict filesystem access to directories used by elasticsearch-certutil.
- Monitor for new private-key files created by the tool and verify encryption status.
The record
It was discovered by Elastic engineering that when elasticsearch-certutil CLI tool is used with the csr option in order to create a new Certificate Signing Requests, the associated private key that is generated is stored on disk unencrypted even if the --pass parameter is passed in the command invocation.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Maven | org.elasticsearch:elasticsearch | 0 | 7.17.23 |
| Maven | org.elasticsearch:elasticsearch | 8.0.0-alpha1 | 8.13.0 |
| Bitnami | elasticsearch | 7.0.0 | 7.17.23 |
| Chainguard | elasticsearch-7 | 0 | 7.17.23-r0 |
| Chainguard | elasticsearch-7-bitnami | 0 | 7.17.23-r0 |
| Chainguard | elasticsearch-7-iamguarded | 0 | 7.17.23-r0 |
| Chainguard | trino | 0 | 453-r1 |
| Chainguard | trino-config | 0 | 453-r1 |
| Chainguard | trino-oci-entrypoint | 0 | 453-r1 |
| Chainguard | trino-plugin-accumulo | 0 | 453-r1 |
| Chainguard | trino-plugin-ai-functions | 0 | 453-r1 |
| Chainguard | trino-plugin-atop | 0 | 453-r1 |
| Chainguard | trino-plugin-bigquery | 0 | 453-r1 |
| Chainguard | trino-plugin-blackhole | 0 | 453-r1 |
| Chainguard | trino-plugin-cassandra | 0 | 453-r1 |
| Chainguard | trino-plugin-clickhouse | 0 | 453-r1 |
| Chainguard | trino-plugin-delta-lake | 0 | 453-r1 |
| Chainguard | trino-plugin-druid | 0 | 453-r1 |
| Chainguard | trino-plugin-duckdb | 0 | 453-r1 |
| Chainguard | trino-plugin-elasticsearch | 0 | 453-r1 |
| Chainguard | trino-plugin-example-http | 0 | 453-r1 |
| Chainguard | trino-plugin-exasol | 0 | 453-r1 |
| Chainguard | trino-plugin-exchange-filesystem | 0 | 453-r1 |
| Chainguard | trino-plugin-exchange-hdfs | 0 | 453-r1 |
| Chainguard | trino-plugin-faker | 0 | 453-r1 |
| Chainguard | trino-plugin-functions-python | 0 | 453-r1 |
| Chainguard | trino-plugin-geospatial | 0 | 453-r1 |
| Chainguard | trino-plugin-google-sheets | 0 | 453-r1 |
| Chainguard | trino-plugin-hive | 0 | 453-r1 |
| Chainguard | trino-plugin-http-event-listener | 0 | 453-r1 |
| Chainguard | trino-plugin-http-server-event-listener | 0 | 453-r1 |
| Chainguard | trino-plugin-hudi | 0 | 453-r1 |
| Chainguard | trino-plugin-iceberg | 0 | 453-r1 |
| Chainguard | trino-plugin-ignite | 0 | 453-r1 |
| Chainguard | trino-plugin-jmx | 0 | 453-r1 |
| Chainguard | trino-plugin-kafka | 0 | 453-r1 |
| Chainguard | trino-plugin-kafka-event-listener | 0 | 453-r1 |
| Chainguard | trino-plugin-kinesis | 0 | 453-r1 |
| Chainguard | trino-plugin-kudu | 0 | 453-r1 |
| Chainguard | trino-plugin-lakehouse | 0 | 453-r1 |
| Chainguard | trino-plugin-ldap-group-provider | 0 | 453-r1 |
| Chainguard | trino-plugin-local-file | 0 | 453-r1 |
| Chainguard | trino-plugin-loki | 0 | 453-r1 |
| Chainguard | trino-plugin-mariadb | 0 | 453-r1 |
| Chainguard | trino-plugin-memory | 0 | 453-r1 |
| Chainguard | trino-plugin-ml | 0 | 453-r1 |
| Chainguard | trino-plugin-mongodb | 0 | 453-r1 |
| Chainguard | trino-plugin-mysql | 0 | 453-r1 |
| Chainguard | trino-plugin-mysql-event-listener | 0 | 453-r1 |
| Chainguard | trino-plugin-opa | 0 | 453-r1 |
| Chainguard | trino-plugin-openlineage | 0 | 453-r1 |
| Chainguard | trino-plugin-opensearch | 0 | 453-r1 |
| Chainguard | trino-plugin-oracle | 0 | 453-r1 |
| Chainguard | trino-plugin-password-authenticators | 0 | 453-r1 |
| Chainguard | trino-plugin-phoenix5 | 0 | 453-r1 |
| Chainguard | trino-plugin-pinot | 0 | 453-r1 |
| Chainguard | trino-plugin-postgresql | 0 | 453-r1 |
| Chainguard | trino-plugin-prometheus | 0 | 453-r1 |
| Chainguard | trino-plugin-ranger | 0 | 453-r1 |
| Chainguard | trino-plugin-raptor-legacy | 0 | 453-r1 |
| Chainguard | trino-plugin-redis | 0 | 453-r1 |
| Chainguard | trino-plugin-redshift | 0 | 453-r1 |
| Chainguard | trino-plugin-resource-group-managers | 0 | 453-r1 |
| Chainguard | trino-plugin-session-property-managers | 0 | 453-r1 |
| Chainguard | trino-plugin-singlestore | 0 | 453-r1 |
| Chainguard | trino-plugin-snowflake | 0 | 453-r1 |
| Chainguard | trino-plugin-spooling-filesystem | 0 | 453-r1 |
| Chainguard | trino-plugin-sqlserver | 0 | 453-r1 |
| Chainguard | trino-plugin-teradata-functions | 0 | 453-r1 |
| Chainguard | trino-plugin-thrift | 0 | 453-r1 |
| Chainguard | trino-plugin-tpcds | 0 | 453-r1 |
| Chainguard | trino-plugin-tpch | 0 | 453-r1 |
| Chainguard | trino-plugin-vertica | 0 | 453-r1 |
| Ubuntu:16.04:LTS | elasticsearch | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | elasticsearch | 0 | No fix |
| Wolfi | trino | 0 | 453-r1 |
| Wolfi | trino-config | 0 | 453-r1 |
| Wolfi | trino-oci-entrypoint | 0 | 453-r1 |
| Wolfi | trino-plugin-accumulo | 0 | 453-r1 |
| Wolfi | trino-plugin-ai-functions | 0 | 453-r1 |
| Wolfi | trino-plugin-atop | 0 | 453-r1 |
| Wolfi | trino-plugin-bigquery | 0 | 453-r1 |
| Wolfi | trino-plugin-blackhole | 0 | 453-r1 |
| Wolfi | trino-plugin-cassandra | 0 | 453-r1 |
| Wolfi | trino-plugin-clickhouse | 0 | 453-r1 |
| Wolfi | trino-plugin-delta-lake | 0 | 453-r1 |
| Wolfi | trino-plugin-druid | 0 | 453-r1 |
| Wolfi | trino-plugin-duckdb | 0 | 453-r1 |
| Wolfi | trino-plugin-elasticsearch | 0 | 453-r1 |
| Wolfi | trino-plugin-example-http | 0 | 453-r1 |
| Wolfi | trino-plugin-exasol | 0 | 453-r1 |
| Wolfi | trino-plugin-exchange-filesystem | 0 | 453-r1 |
| Wolfi | trino-plugin-exchange-hdfs | 0 | 453-r1 |
| Wolfi | trino-plugin-faker | 0 | 453-r1 |
| Wolfi | trino-plugin-functions-python | 0 | 453-r1 |
| Wolfi | trino-plugin-geospatial | 0 | 453-r1 |
| Wolfi | trino-plugin-google-sheets | 0 | 453-r1 |
| Wolfi | trino-plugin-hive | 0 | 453-r1 |
| Wolfi | trino-plugin-http-event-listener | 0 | 453-r1 |
| Wolfi | trino-plugin-http-server-event-listener | 0 | 453-r1 |
| Wolfi | trino-plugin-hudi | 0 | 453-r1 |
| Wolfi | trino-plugin-iceberg | 0 | 453-r1 |
| Wolfi | trino-plugin-ignite | 0 | 453-r1 |
| Wolfi | trino-plugin-jmx | 0 | 453-r1 |
| Wolfi | trino-plugin-kafka | 0 | 453-r1 |
| Wolfi | trino-plugin-kafka-event-listener | 0 | 453-r1 |
| Wolfi | trino-plugin-kinesis | 0 | 453-r1 |
| Wolfi | trino-plugin-kudu | 0 | 453-r1 |
| Wolfi | trino-plugin-lakehouse | 0 | 453-r1 |
| Wolfi | trino-plugin-ldap-group-provider | 0 | 453-r1 |
| Wolfi | trino-plugin-local-file | 0 | 453-r1 |
| Wolfi | trino-plugin-loki | 0 | 453-r1 |
| Wolfi | trino-plugin-mariadb | 0 | 453-r1 |
| Wolfi | trino-plugin-memory | 0 | 453-r1 |
| Wolfi | trino-plugin-ml | 0 | 453-r1 |
| Wolfi | trino-plugin-mongodb | 0 | 453-r1 |
| Wolfi | trino-plugin-mysql | 0 | 453-r1 |
| Wolfi | trino-plugin-mysql-event-listener | 0 | 453-r1 |
| Wolfi | trino-plugin-opa | 0 | 453-r1 |
| Wolfi | trino-plugin-openlineage | 0 | 453-r1 |
| Wolfi | trino-plugin-opensearch | 0 | 453-r1 |
| Wolfi | trino-plugin-oracle | 0 | 453-r1 |
| Wolfi | trino-plugin-password-authenticators | 0 | 453-r1 |
| Wolfi | trino-plugin-phoenix5 | 0 | 453-r1 |
| Wolfi | trino-plugin-pinot | 0 | 453-r1 |
| Wolfi | trino-plugin-postgresql | 0 | 453-r1 |
| Wolfi | trino-plugin-prometheus | 0 | 453-r1 |
| Wolfi | trino-plugin-ranger | 0 | 453-r1 |
| Wolfi | trino-plugin-raptor-legacy | 0 | 453-r1 |
| Wolfi | trino-plugin-redis | 0 | 453-r1 |
| Wolfi | trino-plugin-redshift | 0 | 453-r1 |
| Wolfi | trino-plugin-resource-group-managers | 0 | 453-r1 |
| Wolfi | trino-plugin-session-property-managers | 0 | 453-r1 |
| Wolfi | trino-plugin-singlestore | 0 | 453-r1 |
| Wolfi | trino-plugin-snowflake | 0 | 453-r1 |
| Wolfi | trino-plugin-spooling-filesystem | 0 | 453-r1 |
| Wolfi | trino-plugin-sqlserver | 0 | 453-r1 |
| Wolfi | trino-plugin-teradata-functions | 0 | 453-r1 |
| Wolfi | trino-plugin-thrift | 0 | 453-r1 |
| Wolfi | trino-plugin-tpcds | 0 | 453-r1 |
| Wolfi | trino-plugin-tpch | 0 | 453-r1 |
| Wolfi | trino-plugin-vertica | 0 | 453-r1 |
| maven | org.elasticsearch/elasticsearch | 8.0.0-alpha1 | 8.13.0 |
Related vulnerabilities
- CVE-2025-37731 Improper Authentication in Elasticsearch PKI realm can lead to user impersonation via… Also affects org.elasticsearch:elasticsearch
- CVE-2024-12539 Elasticsearch Incorrect Authorization vulnerability Also affects org.elasticsearch:elasticsearch
- CVE-2023-49921 An issue was discovered by Elastic whereby Watcher search input logged the search query… Also affects org.elasticsearch:elasticsearch
- CVE-2024-37280 A flaw was discovered in Elasticsearch, affecting document ingestion when an index… Also affects org.elasticsearch:elasticsearch
- CVE-2024-23449 An uncaught exception in Elasticsearch >= 8.4.0 and < 8.11.1 occurs when an encrypted PDF… Also affects org.elasticsearch:elasticsearch
- CVE-2024-23451 Incorrect Authorization issue exists in the API key based security model for Remote… Also affects org.elasticsearch:elasticsearch
- CVE-2024-23450 A flaw was discovered in Elasticsearch, where processing a document in a deeply nested… Also affects org.elasticsearch:elasticsearch
- CVE-2023-46673 It was identified that malformed scripts used in the script processor of an Ingest… Also affects org.elasticsearch:elasticsearch