CVE-2018-3824 — elasticsearch
MEDIUMCVE-2018-3824 is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in org.elasticsearch:elasticsearch. A fix is available for org.elasticsearch:elasticsearch — see the affected versions and patch details below.
Elasticsearch subject to cross site scripting
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.elasticsearch:elasticsearch☕org.elasticsearch:elasticsearchReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
X-Pack Machine Learning versions before 6.2.4 and 5.6.9 had a cross-site scripting (XSS) vulnerability. If an attacker is able to inject data into an index that has a ML job running against it, then when another user views the results of the ML job it could allow the attacker to obtain sensitive information from or perform destructive actions on behalf of that other ML user.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.elasticsearch:elasticsearch | all versions | 5.6.9org.elasticsearch:elasticsearch:5.6.9 |
| ☕Maven | org.elasticsearch:elasticsearch | ≥ 6.0.0&&< 6.2.4 | 6.2.4org.elasticsearch:elasticsearch:6.2.4 |
Affected Products
elasticsearch x-packelastickibana x-packelasticlogstash x-packelasticDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.elasticsearch:elasticsearch, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.elasticsearch:elasticsearch to 5.6.9 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2018-3824 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is CVE-2018-3824 in your dependencies?
Find it across Maven, including transitive dependencies.