Improper Limitation of a Pathname to a Restricted Directory in Logstash Leading to Arbitrary File Write
Improper Limitation of a Pathname to a Restricted Directory (CWE-22) in Logstash can lead to arbitrary file write and potentially remote code execution via Relative Path Traversal (CAPEC-139). The archive extraction utilities used by Logstash do not properly validate file paths within compressed archives. An attacker who can serve a specially crafted archive to Logstash through a compromised or attacker-controlled update endpoint can write arbitrary files to the host filesystem with the privileges of the Logstash process. In certain configurations where automatic pipeline reloading is enabled, this can be escalated to remote code execution.
Affected Versions:
- 8.x: All versions from 8.0.0 up to and including 8.19.13
- 9.x:
- All versions from 9.0.0 up to and including 9.2.7
- All versions from 9.3.0 up to and including 9.3.2
Affected Configurations:
Deployments with the GeoIP database downloader enabled and configured to use an external update endpoint are affected. The risk is elevated in configurations where automatic pipeline configuration reloading is enabled and the pipeline configuration directory is writable by the Logstash process.
Solutions and Mitigations:
The issue is resolved in versions 8.19.14, 9.2.8, and 9.3.3.
For Users that Cannot Upgrade:
If you do not require the GeoIP database downloader, the most effective mitigation is to disable it entirely. This fully removes the attack surface, and no further action is needed:
- Set
xpack.geoip.downloader.enabled: falsein the Logstash configuration.
If you must keep the GeoIP database downloader enabled, apply the following together:
- Primary: Ensure the downloader endpoint uses HTTPS and points to a trusted source, to reduce the risk of an attacker substituting or intercepting the update feed.
- Defense-in-depth: Disable automatic pipeline configuration reloading to prevent escalation from file write to code execution.
- Defense-in-depth: Restrict filesystem write permissions for the Logstash process to only the directories it requires, to limit the impact of an arbitrary file write.
Indicators of Compromise (IOC)
Check for unexpected files written outside the GeoIP database directory. Review the filesystem for files that should not exist in pipeline configuration directories or other sensitive locations.
- Monitor Logstash logs for GeoIP database download activity, particularly downloads from unexpected endpoints.
- Check for unexplained pipeline configuration files or changes to existing pipeline configurations.
- Review file integrity monitoring alerts for writes to directories outside the expected GeoIP data path.
Severity: CVSSv3.1: High ( 8.1 ) - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVE ID: CVE-2026-33466
Problem Type: CWE-22 - Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Impact: CAPEC-139 - Relative Path Traversal
Changelog
2026-06-04: Restructured "For Users that Cannot Upgrade" into two paths: disabling the GeoIP downloader as a standalone complete fix, with HTTPS + trusted source and the two hardening steps (defense-in-depth) applying only if the downloader stays enabled.