/

CVE-2026-45807

Severity:

HIGH RISK

(7.7)

Path Traversal (CWE-22) via kestra:// URIs in Kestra API

CVE-2026-45807

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read on Host Filesystem

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 API URI handling allows attackers to bypass directory guards using URL-encoded .. segments in kestra:// URIs.

When an authenticated user can invoke affected endpoints with crafted URIs, they may read arbitrary files accessible to the Kestra process on the host filesystem.

Affected context

This vulnerability appears in Kestra deployments that expose API endpoints accepting kestra:// URIs and using StorageInterface.parentTraversalGuard for safety checks.

It is relevant when the Kestra process has access to sensitive files on the host (e.g., /etc/passwd, mounted secrets, tenant-specific execution outputs) and when authentication allows users to trigger a single execution against these endpoints.

The issue is tied to how URIs are validated and decoded prior to being resolved into filesystem paths, and may manifest wherever URI-encoded path segments are not normalized before use.

Exploit preconditions

  • Attack surface: Kestra HTTP API endpoints that accept kestra:// URIs for storage access.
  • Required access: Authenticated access to Kestra with permission to invoke at least one execution or API call that reads from the local storage backend.
  • Trigger point: Submission of a kestra:// URI containing URL-encoded parent directory segments (e.g., %2E%2E) that pass parentTraversalGuard, followed by downstream resolution and file open.
  • Why exploitation is possible: The guard checks the literal URI.toString() and does not account for URL-encoded .., while downstream code uses URI.getPath() (which decodes %2E%2E into ..) and passes the resulting path directly to Paths.get(...) without normalization, allowing the OS to resolve the .. segments at file open time.

Why this happens

The core issue is insufficient validation and normalization of user-controlled paths derived from URIs before using them in filesystem operations.

The protection logic relies on inspecting the un-decoded string representation of the URI, missing encoded traversal tokens like %2E%2E, and assumes the checked form matches the resolved path.

When URI.getPath() is later invoked, encoded sequences are decoded into .., and the resulting path is handed to Paths.get(...) without canonicalization or enforcement of a fixed root directory.

This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory (Path Traversal), where the application fails to constrain paths to an intended base, allowing attackers to escape the storage sandbox.

Potential impact

  • An authenticated user may read arbitrary files accessible to the Kestra process on the host.
  • Attackers could access system files such as /etc/passwd and configuration files.
  • Secrets mounted into the Kestra environment (cloud credentials, database passwords, API keys) could be exposed.
  • Other tenants' execution outputs and logs may be disclosed, leading to cross-tenant data leakage.
  • Sensitive operational metadata and internal application files can be inspected to aid further attacks.

General mitigation guidance

Mitigation generally focuses on enforcing strict path constraints and robust normalization whenever user input influences filesystem access.

Recommended patterns include:

  • Decoding and normalizing all URI-derived paths before applying traversal checks, ensuring validation occurs on the canonical representation.
  • Enforcing a fixed storage root (jail) and rejecting any paths that resolve outside that directory, using canonical path comparison rather than string inspection alone.
  • Applying explicit checks for parent directory segments after normalization, rather than relying on raw .. substring searches in the un-decoded URI.
  • Treating kestra:// URIs as identifiers rather than direct filesystem paths where possible, resolving them through a controlled mapping layer.
  • Running Kestra under least-privilege accounts and limiting access to sensitive host files to reduce impact even if a traversal occurs.

How teams detect issues like this

Organizations can detect and manage path traversal risks by:

  • Using static analysis rules that flag uses of Paths.get(...), file I/O APIs, and URI-to-path conversions where user-controlled input is not normalized or bounded by a trusted root.
  • Reviewing code paths around StorageInterface, URI parsing, and guard implementations to ensure checks occur on decoded and canonicalized paths.
  • Implementing secure coding policies that mandate canonical path verification and deny any path escaping designated storage directories.
  • Adding runtime logging for rejected or suspicious paths containing traversal markers, coupled with security monitoring for anomalous file access attempts.
  • Employing automated code review tools that recognize CWE-22 patterns and highlight risky path construction or insufficient validation in pull requests.

Sources

SourceLink
github.comgithub.com/kestra-io/kestra/security/advisories/GHSA-3529-p4wf-xp79

Frequently asked

questions

Exploitation is typically limited to authenticated users who can hit the affected API endpoints or trigger executions that accept kestra:// URIs. Within that scope, the attacker may read any file the Kestra process can access, making the impact potentially severe in multi-tenant or sensitive environments.

No host-level shell access is required. The attacker only needs sufficient Kestra application privileges to submit a crafted kestra:// URI to an endpoint that reads from the local storage backend. Host file access is then performed by the Kestra process itself.

The safest pattern is to perform validation and traversal checks on fully decoded, normalized paths and to enforce that all storage access is constrained to a predefined root directory. Any path that resolves outside this root should be rejected regardless of how it was encoded in the original URI.

Preventing similar issues requires consistent use of canonical path resolution, strict root directory enforcement, and avoiding direct use of user-controlled URIs or paths in file APIs. Incorporate these rules into coding standards, back them with static analysis and code review, and run services with minimal filesystem privileges so that even if a validation mistake occurs, the blast radius is limited.

Find out what's already
exploitable in your codebase.