/

CVE-2026-46402

Severity:

HIGH RISK

(8.1)

Path Traversal in Microsoft UFO Automation Framework

CVE-2026-46402

Deferred

Vulnerability type

Category:

Path Traversal / Directory Traversal

CWE:

CWE-22, CWE-73

Impact:

Unauthorized File System Access and Log File Creation Outside Intended Directory

Severity:

HIGH RISK

(8.1)

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

Microsoft UFO's logging subsystem constructs session log paths directly from a user-controlled task_name value, allowing crafted input to escape the intended logs/ directory.

An authenticated client can embed path traversal sequences in task_name, causing UFO to create log directories and files in arbitrary filesystem locations reachable by the service account.

Affected context

This vulnerability appears in Microsoft UFO deployments that:

  • Use version 3.0.1-4-ge2626659 (or code with similar log path construction)
  • Generate per-task or per-session logs based on a task_name parameter
  • Rely on the logs/ directory as the boundary for log file storage

The issue manifests when the application interpolates task_name into filesystem paths without normalizing or constraining it to a safe base directory.

Exploit preconditions

  • Attack surface: Application interfaces (e.g., API endpoints, automation jobs) that accept a task_name parameter and trigger logging.
  • Required access: Valid authenticated client access to the UFO framework, with the ability to submit or control task_name.
  • Trigger point: Any code path that constructs log directory or file paths using task_name, then creates directories or opens files for writing.
  • Why exploitation is possible: The logging logic concatenates task_name directly into filesystem paths without robust validation, canonicalization, or enforcement that the resulting path remains within the intended logs/ directory.

Why this happens

The root cause aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') and CWE-73: External Control of File Name or Path.

The UFO framework trusts a user-supplied task_name to build log paths, typically via string concatenation or naive path joining, without checking for traversal sequences (e.g., ../) or resolving the final path against a fixed, allowed base.

As a result, an authenticated client can influence the effective filesystem location where log directories and log files are created, breaking the assumption that all logs are confined to the logs/ directory.

Potential impact

  • Creation of log directories and files in unintended filesystem locations.
  • Overwriting or clobbering existing files that the service account can write to, potentially impacting system behavior.
  • Planting log content into sensitive or monitored directories, which can confuse diagnostics or incident response.
  • Facilitating secondary attacks when other components later trust or process files based on their presence or location.
  • Leakage of internal directory structure information through error messages or observable behavior.

General mitigation guidance

Effective mitigation focuses on decoupling user-controlled values from filesystem locations and enforcing strict directory boundaries:

  • Constrain log file creation to a pre-defined base directory and resolve all paths to canonical form before use; reject any path that escapes the base.
  • Avoid using raw user input in path construction; instead, map task_name to a sanitized identifier (e.g., using whitelisting, slugification, or an internal ID).
  • Normalize and validate task_name against a strict allowlist of characters and length, avoiding characters used in path traversal (such as path separators).
  • Use filesystem APIs that support secure path joining and base directory enforcement instead of manual string concatenation.
  • Apply least-privilege principles to the UFO service account so that even if traversal occurs, the process can write only to non-sensitive locations.

How teams detect issues like this

Detection generally combines code-centric and runtime-focused practices:

  • Static analysis: Configure rules to flag any use of user-controlled input in file or directory path construction, especially where ../ or absolute paths might be interpreted.
  • Code review: Examine logging and file output logic for string concatenation with request parameters like task_name; confirm that canonicalization and base-directory checks are in place.
  • Security testing: Perform targeted path traversal tests using authenticated clients, attempting to write logs outside the logs/ directory and verifying both behavior and resulting filesystem paths.
  • Monitoring and logging: Instrument the system to record unexpected log path locations or failures to open files; alerts can be raised when log paths leave the expected directory tree.

Sources

SourceLink
github.comgithub.com/microsoft/UFO/security/advisories/GHSA-whcg-fgpx-76f2

Frequently asked

questions

It is remotely exploitable through the application's authenticated interfaces. An attacker only needs network access to the UFO service and valid credentials that allow submission of task_name values.

The attacker must be an authenticated client of the UFO framework. Anonymous users cannot exploit it unless the deployment exposes unauthenticated endpoints that accept task_name and trigger logging.

The safest pattern is to enforce a strict base directory for all file operations and to treat user input as a label rather than a path component. Always canonicalize the computed path and verify that it resides within the intended directory before creating or writing files.

Establish secure coding guidelines for file handling that forbid direct use of user input in file and directory paths, adopt path validation utilities or libraries as standard practice, integrate static analysis checks for path traversal, and require code review sign-off on all new or modified file I/O logic.

Find out what's already
exploitable in your codebase.