/

CVE-2026-49984

Severity:

HIGH RISK

(7.7)

Path Traversal (CWE-22) in Kestra File Retrieval API

CVE-2026-49984

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-180, CWE-200

Impact:

Unauthorized File System Access and Data Exposure

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal flaw in Kestra's local internal-storage backend lets attackers bypass directory validation by using Windows-style backslashes that are only normalized after checks run.

Any authenticated user who can view an execution can exploit this to read arbitrary files accessible to the Kestra process, breaking storage isolation and multi-tenancy boundaries.

Affected context

The vulnerability occurs in Kestra deployments that use the local internal-storage backend and expose the file retrieval API endpoint.

It is relevant when path validation is applied before normalizing path separators, particularly in environments where user-controlled paths may include both forward slashes and backslashes.

Risk increases in multi-tenant setups or where sensitive files—such as databases, configuration, and secret stores—are readable by the Kestra process user.

Exploit preconditions

  • Attack surface: HTTP endpoint GET /api/v1/{tenant}/executions/{executionId}/file?path=…
  • Required access: Any authenticated account with permission to view an execution (lowest-privilege role)
  • Trigger point: Supplying a crafted path parameter containing traversal sequences expressed with backslashes (e.g., ..\..\..) that are normalized after validation
  • Why exploitation is possible: The path validation logic checks for traversal using forward slashes but runs before converting backslashes to forward slashes, allowing traversal sequences to evade the guard and be interpreted as ../../../ only at file-open time

Why this happens

The bug stems from performing security checks on a representation of user input that differs from the representation used by the underlying file system.

In this case, Kestra validates paths for .. traversal using forward-slash semantics, but fails to normalize Windows-style backslashes before validation, creating a mismatch in how paths are interpreted.

This aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory and CWE-180: Incorrect Behavior Order, where validation occurs on unnormalized data, allowing attackers to craft paths that pass checks yet resolve outside the intended sandbox.

Potential impact

  • An attacker may read arbitrary files on the server filesystem that are readable by the Kestra process user.
  • They could access the embedded H2 database, exposing all flows, user records, and stored secrets.
  • They can potentially read internal storage of other tenants and namespaces, breaking multi-tenancy isolation.
  • They may retrieve mounted secret files and environment variables (e.g., /proc/self/environ), including credentials for databases and secret backends.
  • They can gain extensive insight into system configuration that could be used for further compromise.

General mitigation guidance

Mitigation typically involves enforcing strict, canonical path handling before any security decisions are made.

Common defensive patterns include:

  • Normalizing and canonicalizing paths (including separator conversion and resolving ./..) prior to validation and use.
  • Enforcing a robust allowlist-based policy where only paths under a defined root directory are permitted, using resolved absolute paths to confirm containment.
  • Avoiding direct concatenation of user input into filesystem paths, instead mapping logical identifiers to server-side paths.
  • Running the orchestration service under a dedicated, least-privilege account with restricted filesystem access, so that even if traversal occurs, reachable data is minimized.
  • Separating storage for different tenants or namespaces at the operating system level to reduce cross-tenant exposure.

How teams detect issues like this

Effective detection strategies focus on both code-level and runtime signals:

  • Static analysis rules that flag uses of user-supplied path parameters combined with filesystem APIs without prior normalization and containment checks.
  • Code review guidelines that highlight any path validation logic that operates on non-canonical strings or relies on simple substring checks for .. rather than using secure path resolution utilities.
  • Security tests and fuzzing of file-serving endpoints with mixed slash styles (/ and \) to detect bypasses in validation layers.
  • Central logging of file-access requests, including the original and normalized path values, with alerts for attempts to access outside the expected storage root.
  • Periodic policy audits to ensure that tenant-specific storage and secrets are not co-located in ways that magnify impact of traversal bugs.

Sources

SourceLink
github.comgithub.com/kestra-io/kestra/security/advisories/GHSA-qw4v-6w32-xx9h

Frequently asked

questions

Any authenticated user who can view an execution can reach the vulnerable endpoint, regardless of their tenant or namespace, making exploitation possible from the lowest-privilege accounts.

The attacker only needs standard application-level access with permission to list or view executions; no administrative role or direct filesystem access is required.

Normalize and canonicalize all user-supplied paths before validation, then enforce strict containment checks against a predefined storage root, preferably combined with a mapping layer that avoids exposing raw filesystem paths.

Adopt secure-by-default path handling utilities, codify coding standards that forbid using raw user input in filesystem paths, integrate static analysis for traversal patterns into CI, and regularly penetration-test file and log retrieval endpoints with malformed and mixed-separator paths.

Find out what's already
exploitable in your codebase.