CVE-2023-49921: Elasticsearch Elasticsearch Insertion Of Sensitive Information Vulnerability
MODERATECVE-2023-49921 is a MODERATE (CVSS 5.2) elasticsearch insertion of sensitive information vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Elasticsearch libraries in the Maven ecosystem. The issue involves elasticsearch insertion of sensitive information into log file. Remediation is available by upgrading affected packages to version 7.17.16, 8.11.2.
CVE-2023-49921 at a Glance
Security Impact
CVSS: 5.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N).
How to Fix CVE-2023-49921
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>7.17.16</version>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>8.11.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-2023-49921, 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 7.17.16), 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-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. 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-2023-49921 Affected Elasticsearch Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.elasticsearch:elasticsearch
|
Maven |
< 7.17.16
|
7.17.16
|
|
org.elasticsearch:elasticsearch
|
Maven |
≥ 8.0.0
< 8.11.2
|
8.11.2
|
References
Frequently Asked Questions
What is CVE-2023-49921?
Which Elasticsearch versions are affected?
What version fixes CVE-2023-49921?
Is elasticsearch affected?
What is the CVSS score of CVE-2023-49921?
What CWE is associated with CVE-2023-49921?
How can I check Maven dependencies for CVE-2023-49921?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2hjr-vmf3-xwvp",
"modified" : "2024-07-26T14:18:08Z",
"published" : "2024-07-26T06:30:47Z",
"aliases" : [ "CVE-2023-49921" ],
"summary" : "Elasticsearch Insertion of Sensitive Information into Log File",
"details" : "An issue was discovered by Elastic whereby Watcher search input logged the search query results on DEBUG log level. This could lead to raw contents of documents stored in Elasticsearch to be printed in logs. Elastic has released 8.11.2 and 7.17.16 that resolves this issue by removing this excessive logging. This issue only affects users that use Watcher and have a Watch defined that uses the search input and additionally have set the search input’s logger to DEBUG or finer, for example using: org.elasticsearch.xpack.watcher.input.search, org.elasticsearch.xpack.watcher.input, org.elasticsearch.xpack.watcher, or wider, since the loggers are hierarchical.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:A/AC:L/AT:P/PR:L/UI:P/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" : "0"
}, {
"fixed" : "7.17.16"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.elasticsearch:elasticsearch"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.11.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-49921"
}, {
"type" : "WEB",
"url" : "https://discuss.elastic.co/t/elasticsearch-8-11-2-7-17-16-security-update-esa-2023-29/349179"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/elastic/elasticsearch"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-532" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-26T14:18:08Z",
"nvd_published_at" : "2024-07-26T05:15:10Z"
}
}