/

CVE-2026-29059

Severity:

HIGH RISK

(7.5)

Path Traversal in Windmill get_log_file Endpoint

CVE-2026-29059

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized File Read / Information Disclosure

Severity:

HIGH RISK

(7.5)

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

An unauthenticated path traversal vulnerability in Windmill's get_log_file endpoint allows attackers to manipulate the filename parameter to traverse directories on the server.

By injecting ../ sequences, an attacker can read arbitrary files that the Windmill server process can access, exposing sensitive configuration, credentials, or application data.

Affected context

This vulnerability affects Windmill deployments where the get_log_file endpoint (/api/w/{workspace}/jobs_u/get_log_file/{filename}) is exposed and reachable, typically in production or staging environments.

The issue arises when the server constructs a filesystem path from the unvalidated filename parameter and serves the requested file as a job log.

Any deployment where this endpoint is accessible without strong upstream filtering or isolation may be at risk, especially when the Windmill process has access to sensitive files on the host.

Exploit preconditions

  • Attack surface: HTTP(S) interface, specifically the get_log_file API endpoint.
  • Required access: No authentication required; any network client that can reach the endpoint can attempt exploitation.
  • Trigger point: Supplying a crafted filename path segment containing directory traversal sequences (e.g., ../) to navigate outside the intended log directory.
  • Why exploitation is possible: The server concatenates the user-controlled filename directly into a filesystem path without normalization, canonicalization, or restriction to an allowed directory, enabling traversal to arbitrary readable locations.

Why this happens

The core issue is improper neutralization of path elements when constructing filesystem paths from user input, aligning with CWE-22: Improper Limitation of a Pathname to a Restricted Directory.

Instead of strictly confining access to a designated log directory, the implementation appears to join the filename parameter directly into the path, trusting that it references only a log file.

Without canonicalization and validation (e.g., enforcing that the resolved path remains under a specific base directory), directory traversal sequences like ../ allow access to files outside the intended scope.

This pattern reflects a broader bug class where file operations are performed on paths derived from untrusted input without adequate constraint or normalization.

Potential impact

  • Unauthorized reading of application configuration files that may contain secrets or API keys.
  • Exposure of environment-specific secrets such as database credentials, tokens, or cryptographic keys.
  • Disclosure of system files that reveal OS details, user accounts, or service configurations.
  • Access to other application logs that may include sensitive user data or internal error traces.
  • Collection of information that can facilitate further attacks, such as privilege escalation or lateral movement.

General mitigation guidance

Effective mitigation focuses on constraining file access to a tightly controlled directory and minimizing trust in user-supplied path components.

Recommended defensive patterns include:

  • Avoid constructing filesystem paths via simple string concatenation; instead, join paths using standard utilities and canonicalize the result.
  • Enforce a strict allowlist of files or patterns when serving logs (e.g., mapping logical identifiers to known log filenames rather than accepting raw paths).
  • After resolving a path, verify that it remains within a predefined base directory (e.g., compare canonical paths or use chroot-like directory scoping).
  • Separate sensitive configuration and secret storage from application-readable log directories where feasible.
  • Run the Windmill service with least-privilege file system permissions so that even if path traversal occurs, the process cannot read highly sensitive system or secret files.

How teams detect issues like this

Detection of similar vulnerabilities is typically done through a combination of static and dynamic techniques:

  • Static analysis: Scan code for patterns where request parameters or route segments are used directly in file operations (open, read, or framework file-serving utilities) without validation or canonicalization.
  • Code review: Flag endpoints that expose file reading or download behavior; reviewers should verify strict base-directory enforcement and the absence of ../-sensitive joins.
  • Security testing: Use automated or manual HTTP testing to attempt directory traversal sequences on any file-serving endpoints, confirming that requests outside the intended directory are rejected.
  • Runtime monitoring: Configure logs or WAF rules to detect requests containing traversal patterns (e.g., ../, %2e%2e/) and alert or block when such patterns appear.

Sources

SourceLink
github.comgithub.com/windmill-labs/windmill/releases/tag/v1.603.3
github.comgithub.com/windmill-labs/windmill/security/advisories/GHSA-24fr-44f8-fqwg
github.comgithub.com/Chocapikk/Windfall

Frequently asked

questions

Yes. Any remote client that can reach the affected get_log_file endpoint can attempt to exploit the path traversal, without needing authentication, assuming no additional network-layer protections are in place.

The attacker needs only network access to the Windmill API endpoint. No valid user account or API token is required if the endpoint is exposed unauthenticated as described.

Use a strict, server-controlled mapping from logical identifiers to filenames, canonicalize the resulting paths, and enforce that the final resolved path is within a designated base directory. Avoid ever using raw user-supplied strings as full or partial filesystem paths.

Establish secure coding guidelines that forbid unchecked use of user input in file operations, incorporate static analysis rules targeting path usage, require security-focused code review for any file-serving endpoints, and add automated tests that confirm directory traversal attempts are rejected.

Find out what's already
exploitable in your codebase.