CVE-2018-17247: Elasticsearch Improper Restriction Of XML External Vulnerability
MODERATECVE-2018-17247 is a MODERATE (CVSS 5.9) improper restriction of xml external vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Elasticsearch libraries in the Maven ecosystem. The issue involves improper restriction of xml external entity reference in elasticsearch. Remediation is available by upgrading affected packages to version 6.5.2.
CVE-2018-17247 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2018-17247
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>6.5.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-2018-17247, 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 6.5.2), 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-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. 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-2018-17247 Affected Elasticsearch Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.elasticsearch:elasticsearch
|
Maven |
≥ 6.5.0
< 6.5.2
|
6.5.2
|
References
Frequently Asked Questions
What is CVE-2018-17247?
Which Elasticsearch versions are affected?
What version fixes CVE-2018-17247?
Is elasticsearch affected?
What is the CVSS score of CVE-2018-17247?
What CWE is associated with CVE-2018-17247?
How can I check Maven dependencies for CVE-2018-17247?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-ccmr-qj26-845g",
"modified" : "2022-06-28T23:22:46Z",
"published" : "2022-05-13T01:34:04Z",
"aliases" : [ "CVE-2018-17247" ],
"summary" : "Improper Restriction of XML External Entity Reference in Elasticsearch",
"details" : "Elasticsearch Security versions 6.5.0 and 6.5.1 contain an XXE flaw in Machine Learning's find_file_structure API. If a policy allowing external network access has been added to Elasticsearch's Java Security Manager then an attacker could send a specially crafted request capable of leaking content of local files on the Elasticsearch node. This could allow a user to access information that they should not have access to.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.elasticsearch:elasticsearch"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.5.0"
}, {
"fixed" : "6.5.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-17247"
}, {
"type" : "WEB",
"url" : "https://discuss.elastic.co/t/elastic-stack-6-5-2-security-update/159594"
}, {
"type" : "WEB",
"url" : "https://www.elastic.co/community/security"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/106294"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-28T23:22:46Z",
"nvd_published_at" : "2018-12-20T22:29:00Z"
}
}