/

CVE-2026-67429

Severity:

CRITICAL RISK

(10.0)

Path Traversal (CWE-22) in Flyto2 Core File Writing

CVE-2026-67429

Deferred

Vulnerability type

Category:

Path Traversal and Insecure File Handling

CWE:

CWE-22, CWE-73

Impact:

Arbitrary File Write and Filesystem Compromise

Severity:

CRITICAL RISK

(10.0)

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

Flyto2 Core prior to 2.26.6 allows caller-controlled output directories to be used by image.download and related file-writing modules without sandbox validation.

If an attacker can influence workflow configuration or AI-agent outputs, they can cause arbitrary response bytes to be written to filesystem paths accessible to the process, enabling data corruption, configuration tampering, or further compromise.

Flyto2 Core prior to 2.26.6 allows caller-controlled output directories to be used by image.download and related file-writing modules without sandbox validation.

If an attacker can influence workflow configuration or AI-agent outputs, they can cause arbitrary response bytes to be written to filesystem paths accessible to the process, enabling data corruption, configuration tampering, or further compromise.

Affected context

This vulnerability occurs in Flyto2 Core automation and AI-agent workflows where:

  • The image.download module and similar file-writing components accept a caller-provided output_dir
  • Path validation and confinement via validate_path_with_env_config and FLYTO_SANDBOX_DIR are not enforced
  • Workflows or agents can be driven by user-controlled or externally sourced parameters

Deployments that run Flyto2 Core with broad filesystem access or elevated privileges are more exposed, but even restricted environments can see unauthorized file modification.

This vulnerability occurs in Flyto2 Core automation and AI-agent workflows where:

  • The image.download module and similar file-writing components accept a caller-provided output_dir
  • Path validation and confinement via validate_path_with_env_config and FLYTO_SANDBOX_DIR are not enforced
  • Workflows or agents can be driven by user-controlled or externally sourced parameters

Deployments that run Flyto2 Core with broad filesystem access or elevated privileges are more exposed, but even restricted environments can see unauthorized file modification.

Exploit preconditions

  • Attack surface: Workflow configuration, task parameters, or AI-agent instructions that influence output_dir and download targets.
  • Required access: Ability to define or modify automation workflows, agent prompts, or API calls that invoke image.download or similar modules.
  • Trigger point: Execution of a workflow step that downloads content and writes it to a filesystem path derived from attacker-controlled output_dir.
  • Why exploitation is possible: The code trusts caller-supplied paths instead of enforcing sandbox confinement via validate_path_with_env_config and FLYTO_SANDBOX_DIR, enabling path traversal or direct selection of sensitive locations.
  • Attack surface: Workflow configuration, task parameters, or AI-agent instructions that influence output_dir and download targets.
  • Required access: Ability to define or modify automation workflows, agent prompts, or API calls that invoke image.download or similar modules.
  • Trigger point: Execution of a workflow step that downloads content and writes it to a filesystem path derived from attacker-controlled output_dir.
  • Why exploitation is possible: The code trusts caller-supplied paths instead of enforcing sandbox confinement via validate_path_with_env_config and FLYTO_SANDBOX_DIR, enabling path traversal or direct selection of sensitive locations.

Why this happens

The underlying bug class aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory and CWE-73: External Control of File Name or Path.

File-writing modules treat the output_dir parameter as trustworthy, constructing filesystem paths without validating that they remain within a confined sandbox directory.

This insecure pattern allows external inputs to control where downloaded bytes are written, breaking directory confinement and enabling arbitrary file writes in any location the process can access.

The underlying bug class aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory and CWE-73: External Control of File Name or Path.

File-writing modules treat the output_dir parameter as trustworthy, constructing filesystem paths without validating that they remain within a confined sandbox directory.

This insecure pattern allows external inputs to control where downloaded bytes are written, breaking directory confinement and enabling arbitrary file writes in any location the process can access.

Potential impact

  • Attackers may write arbitrary data to configuration files or logs, potentially altering application behavior.
  • Attackers could overwrite or corrupt critical workflow artifacts, models, or data assets.
  • Attackers can plant or modify scripts, templates, or other executable content the automation platform later runs.
  • Attackers may be able to pivot to remote code execution if written files are interpreted or executed by other components.
  • Attackers could exfiltrate or poison data by manipulating where sensitive information is stored or read.
  • Attackers may write arbitrary data to configuration files or logs, potentially altering application behavior.
  • Attackers could overwrite or corrupt critical workflow artifacts, models, or data assets.
  • Attackers can plant or modify scripts, templates, or other executable content the automation platform later runs.
  • Attackers may be able to pivot to remote code execution if written files are interpreted or executed by other components.
  • Attackers could exfiltrate or poison data by manipulating where sensitive information is stored or read.

General mitigation guidance

Effective mitigation centers on strict path confinement and reducing trust in caller-controlled file locations:

  • Ensure all file-writing paths are derived through a validated sandbox function that enforces a fixed base directory and rejects traversal outside it.
  • Treat workflow parameters, agent outputs, and API inputs as untrusted, normalizing and validating any path-like values before using them.
  • Apply least-privilege to the Flyto2 Core runtime so that it has access only to directories required for operation, limiting impact even if a write escapes the sandbox.
  • Use deny-by-default policies for sensitive filesystem locations (configuration, binaries, secrets) and avoid tying workflow behavior to file contents in unrestricted paths.
  • Design automation steps so that downloaded content is stored in isolated, non-executable directories, reducing the risk of code execution from written files.

Effective mitigation centers on strict path confinement and reducing trust in caller-controlled file locations:

  • Ensure all file-writing paths are derived through a validated sandbox function that enforces a fixed base directory and rejects traversal outside it.
  • Treat workflow parameters, agent outputs, and API inputs as untrusted, normalizing and validating any path-like values before using them.
  • Apply least-privilege to the Flyto2 Core runtime so that it has access only to directories required for operation, limiting impact even if a write escapes the sandbox.
  • Use deny-by-default policies for sensitive filesystem locations (configuration, binaries, secrets) and avoid tying workflow behavior to file contents in unrestricted paths.
  • Design automation steps so that downloaded content is stored in isolated, non-executable directories, reducing the risk of code execution from written files.

How teams detect issues like this

Organizations can identify this class of vulnerability through:

  • Static analysis patterns that flag uses of caller-controlled path parameters in file-write APIs without preceding sandbox or validation routines.
  • Code review checklists that require verification of path normalization, restriction to approved base directories, and explicit rejection of traversal sequences like ../.
  • Runtime monitoring to detect unusual writes to sensitive directories (e.g., configuration, binaries, or model repositories) originating from workflow or agent modules.
  • Policy enforcement that prevents deployment of workflows or agents that specify arbitrary filesystem paths or override sandbox settings.
  • Periodic security audits focusing on components that handle downloads, file generation, and artifact storage, ensuring they follow consistent confinement patterns.

Organizations can identify this class of vulnerability through:

  • Static analysis patterns that flag uses of caller-controlled path parameters in file-write APIs without preceding sandbox or validation routines.
  • Code review checklists that require verification of path normalization, restriction to approved base directories, and explicit rejection of traversal sequences like ../.
  • Runtime monitoring to detect unusual writes to sensitive directories (e.g., configuration, binaries, or model repositories) originating from workflow or agent modules.
  • Policy enforcement that prevents deployment of workflows or agents that specify arbitrary filesystem paths or override sandbox settings.
  • Periodic security audits focusing on components that handle downloads, file generation, and artifact storage, ensuring they follow consistent confinement patterns.

Sources

SourceLink
github.comgithub.com/flytohub/flyto-core/commit/d5f89d71303e3c1e6418d347c5c55fcd173cc8cc
github.comgithub.com/flytohub/flyto-core/releases/tag/v2.26.6
github.comgithub.com/flytohub/flyto-core/security/advisories/GHSA-2956-977x-2w3r

Frequently asked

questions

Exploitability depends on who can influence Flyto2 Core workflows and agents. Any party that can supply or modify output_dir values or related parameters may direct file writes to unintended locations within the permissions of the process.

An attacker needs logical access to define or manipulate workflows, agent configurations, prompts, or API calls that invoke the affected file-writing modules. Direct OS-level access is not required; control over workflow inputs is sufficient.

The safest fix is to route all file-writing operations through a path validation and confinement layer that enforces a fixed sandbox directory, rejects traversal outside it, and treats all external path inputs as untrusted. This should be applied consistently across all modules that write files.

Establish patterns where paths are never built directly from external inputs, mandate a shared sandbox utility for file access, and include path confinement checks in code review and CI policies. Combine this with least-privilege filesystem permissions and clear separation between data directories and executable or configuration locations.

Exploitability depends on who can influence Flyto2 Core workflows and agents. Any party that can supply or modify output_dir values or related parameters may direct file writes to unintended locations within the permissions of the process.

An attacker needs logical access to define or manipulate workflows, agent configurations, prompts, or API calls that invoke the affected file-writing modules. Direct OS-level access is not required; control over workflow inputs is sufficient.

The safest fix is to route all file-writing operations through a path validation and confinement layer that enforces a fixed sandbox directory, rejects traversal outside it, and treats all external path inputs as untrusted. This should be applied consistently across all modules that write files.

Establish patterns where paths are never built directly from external inputs, mandate a shared sandbox utility for file access, and include path confinement checks in code review and CI policies. Combine this with least-privilege filesystem permissions and clear separation between data directories and executable or configuration locations.

Find out what's already
exploitable in your codebase.