/

CVE-2026-67427

Severity:

HIGH RISK

(8.6)

Env Expansion Bypass (CWE-693) in Flyto2 Core Engine

CVE-2026-67427

Deferred

Vulnerability type

Category:

Capability Policy Bypass / Access Control Flaw

CWE:

CWE-522, CWE-668, CWE-693

Impact:

Unauthorized Secret Exfiltration from Environment

Severity:

HIGH RISK

(8.6)

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's workflow engine variable resolver expands ${env.VAR} into any host environment variable without enforcing the configured capability policy.

When a workflow can inject such variable references, it may exfiltrate secrets that should be blocked by env-related denylist rules, especially through otherwise allowed modules and sinks.

Flyto2 Core's workflow engine variable resolver expands ${env.VAR} into any host environment variable without enforcing the configured capability policy.

When a workflow can inject such variable references, it may exfiltrate secrets that should be blocked by env-related denylist rules, especially through otherwise allowed modules and sinks.

Affected context

This vulnerability arises in Flyto2 Core deployments where:

  • Workflows or agents can define or influence parameters that are later resolved by the engine's variable resolver
  • The system relies on a capability policy (denylist/allowlist) to control access to environment variables via functions like env.get or env.load_dotenv
  • Environment variables include sensitive secrets such as API keys, tokens, database credentials, or cloud access keys

In these conditions, the implicit ${env.VAR} expansion path becomes a backdoor that bypasses the intended capability enforcement.

This vulnerability arises in Flyto2 Core deployments where:

  • Workflows or agents can define or influence parameters that are later resolved by the engine's variable resolver
  • The system relies on a capability policy (denylist/allowlist) to control access to environment variables via functions like env.get or env.load_dotenv
  • Environment variables include sensitive secrets such as API keys, tokens, database credentials, or cloud access keys

In these conditions, the implicit ${env.VAR} expansion path becomes a backdoor that bypasses the intended capability enforcement.

Exploit preconditions

  • Attack surface: Workflow parameter injection or modification, including:
  • User-provided workflow inputs
  • Agent-generated prompts or configurations
  • Integration code that passes parameters into the workflow engine
  • Required access: Ability to define or alter parameters that the Flyto2 Core resolver processes (e.g., template strings containing ${env.VAR}).
  • Trigger point: Execution of a workflow step where the engine resolves variables and then passes the resolved values into allowed modules (HTTP clients, loggers, storage connectors, etc.).
  • Why exploitation is possible: The resolver expands ${env.VAR} using unguarded access to all host environment variables, and this expansion is not checked against the capability policy denylist for env.get or env.load_dotenv. As a result, policy-governed secret access controls are silently bypassed via the resolver path.
  • Attack surface: Workflow parameter injection or modification, including:
  • User-provided workflow inputs
  • Agent-generated prompts or configurations
  • Integration code that passes parameters into the workflow engine
  • Required access: Ability to define or alter parameters that the Flyto2 Core resolver processes (e.g., template strings containing ${env.VAR}).
  • Trigger point: Execution of a workflow step where the engine resolves variables and then passes the resolved values into allowed modules (HTTP clients, loggers, storage connectors, etc.).
  • Why exploitation is possible: The resolver expands ${env.VAR} using unguarded access to all host environment variables, and this expansion is not checked against the capability policy denylist for env.get or env.load_dotenv. As a result, policy-governed secret access controls are silently bypassed via the resolver path.

Why this happens

The root cause is an inconsistent enforcement of environment access controls inside the workflow engine's variable resolution layer.

While explicit environment access functions (e.g., env.get) are subject to a capability policy and denylist, the ${env.VAR} expansion mechanism directly reads host environment variables without consulting the same policy.

This constitutes a policy bypass under CWE-693: Protection Mechanism Failure, and is closely related to improper handling of credentials (CWE-522) and incorrect resource exposure via an unintended interface (CWE-668). The abstract insecure pattern is a secondary access path to protected data that omits security checks assumed to be global.

The root cause is an inconsistent enforcement of environment access controls inside the workflow engine's variable resolution layer.

While explicit environment access functions (e.g., env.get) are subject to a capability policy and denylist, the ${env.VAR} expansion mechanism directly reads host environment variables without consulting the same policy.

This constitutes a policy bypass under CWE-693: Protection Mechanism Failure, and is closely related to improper handling of credentials (CWE-522) and incorrect resource exposure via an unintended interface (CWE-668). The abstract insecure pattern is a secondary access path to protected data that omits security checks assumed to be global.

Potential impact

  • Workflow parameters may expose API keys, tokens, and other confidential environment-based secrets.
  • Attackers could exfiltrate secrets to external services via permitted modules (e.g., HTTP, messaging, logging).
  • Compromise of downstream systems that trust environment-based credentials (databases, cloud services, CI/CD pipelines).
  • Escalation from low-privilege workflow access to broader infrastructure access by harvesting privileged environment variables.
  • Undermining of organizational capability policies, leading to loss of trust in policy-based controls across automation and AI-agent workflows.
  • Workflow parameters may expose API keys, tokens, and other confidential environment-based secrets.
  • Attackers could exfiltrate secrets to external services via permitted modules (e.g., HTTP, messaging, logging).
  • Compromise of downstream systems that trust environment-based credentials (databases, cloud services, CI/CD pipelines).
  • Escalation from low-privilege workflow access to broader infrastructure access by harvesting privileged environment variables.
  • Undermining of organizational capability policies, leading to loss of trust in policy-based controls across automation and AI-agent workflows.

General mitigation guidance

Effective mitigation focuses on aligning all environment-variable access paths with a single, enforceable policy and reducing secret exposure by design.

Recommended pattern-level strategies include:

  • Centralize environment access behind a controlled abstraction that always consults capability and policy rules, including template or resolver expansions.
  • Introduce explicit allowlists for which environment variables may be referenced from workflows, and treat all others as non-resolvable within engine templates.
  • Implement secret segmentation so high-value credentials are not broadly present in the host environment; use scoped secret stores or per-workflow credentials instead.
  • Apply least-privilege principles to automation and agent workflows, ensuring they only receive the minimal configuration data necessary for their tasks.
  • Default to non-resolution or safe placeholders for ${env.VAR}-style references unless they pass validation against a security-aware configuration schema.
  • Adopt secure configuration patterns where secret material is accessed through dedicated secret-management integrations rather than generic environment expansion.

Effective mitigation focuses on aligning all environment-variable access paths with a single, enforceable policy and reducing secret exposure by design.

Recommended pattern-level strategies include:

  • Centralize environment access behind a controlled abstraction that always consults capability and policy rules, including template or resolver expansions.
  • Introduce explicit allowlists for which environment variables may be referenced from workflows, and treat all others as non-resolvable within engine templates.
  • Implement secret segmentation so high-value credentials are not broadly present in the host environment; use scoped secret stores or per-workflow credentials instead.
  • Apply least-privilege principles to automation and agent workflows, ensuring they only receive the minimal configuration data necessary for their tasks.
  • Default to non-resolution or safe placeholders for ${env.VAR}-style references unless they pass validation against a security-aware configuration schema.
  • Adopt secure configuration patterns where secret material is accessed through dedicated secret-management integrations rather than generic environment expansion.

How teams detect issues like this

Detection generally relies on both code-level and configuration-level analysis of the workflow engine and its usage patterns.

Useful approaches include:

  • Static analysis checks for variable resolvers and template engines that directly access environment variables without policy hooks or guardrails.
  • Configuration reviews to identify workflow templates or parameters containing ${env.*} patterns, especially in contexts that forward resolved values to external sinks.
  • Policy enforcement tests that verify environment-based access is consistently blocked or allowed across all access paths, including implicit resolvers and helper utilities.
  • Runtime logging and monitoring of workflow variable resolution, flagging occurrences where environment values are read and passed to network, storage, or logging modules.
  • Integration of automated security review tools into CI/CD to scan for unmediated environment reads and policy inconsistencies in automation and agent frameworks.

Detection generally relies on both code-level and configuration-level analysis of the workflow engine and its usage patterns.

Useful approaches include:

  • Static analysis checks for variable resolvers and template engines that directly access environment variables without policy hooks or guardrails.
  • Configuration reviews to identify workflow templates or parameters containing ${env.*} patterns, especially in contexts that forward resolved values to external sinks.
  • Policy enforcement tests that verify environment-based access is consistently blocked or allowed across all access paths, including implicit resolvers and helper utilities.
  • Runtime logging and monitoring of workflow variable resolution, flagging occurrences where environment values are read and passed to network, storage, or logging modules.
  • Integration of automated security review tools into CI/CD to scan for unmediated environment reads and policy inconsistencies in automation and agent frameworks.

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-hr7p-wg7r-hg9m

Frequently asked

questions

Exploitability depends on who can define or influence workflow parameters. In environments where users, agents, or external integrations can inject or edit template strings that the resolver processes, the issue can be widely exploitable. In tightly controlled setups with strictly predefined workflows, the practical exposure may be narrower but still present.

An attacker needs the ability to create, modify, or supply workflow parameters or templates that are resolved by Flyto2 Core. Direct system or shell access is not required; access to the workflow configuration interface or API is sufficient if it allows inserting strings with ${env.VAR} references.

The safest fix is to ensure that all environment-variable accesses, including implicit template expansions, pass through a single, policy-aware gatekeeper. This gatekeeper should enforce allowlists, deny sensitive variable names, and prevent resolution of secrets unless explicitly authorized. Removing unmediated environment expansion from the resolver and standardizing on a secure abstraction minimizes the chance of future bypasses.

Teams can prevent similar issues by designing workflow engines with clear trust boundaries and consistent enforcement mechanisms. This includes:

  • Treating templates, variable resolvers, and helper utilities as privileged components that must obey the same security policies as explicit APIs.
  • Conducting threat modeling focused on secondary access paths to secrets and credentials (templating, debug tools, system helpers).
  • Using centralized secret management rather than relying on environment variables for high-value credentials.
  • Embedding policy checks and security tests into development and review processes so that new features cannot bypass existing protective controls.

Exploitability depends on who can define or influence workflow parameters. In environments where users, agents, or external integrations can inject or edit template strings that the resolver processes, the issue can be widely exploitable. In tightly controlled setups with strictly predefined workflows, the practical exposure may be narrower but still present.

An attacker needs the ability to create, modify, or supply workflow parameters or templates that are resolved by Flyto2 Core. Direct system or shell access is not required; access to the workflow configuration interface or API is sufficient if it allows inserting strings with ${env.VAR} references.

The safest fix is to ensure that all environment-variable accesses, including implicit template expansions, pass through a single, policy-aware gatekeeper. This gatekeeper should enforce allowlists, deny sensitive variable names, and prevent resolution of secrets unless explicitly authorized. Removing unmediated environment expansion from the resolver and standardizing on a secure abstraction minimizes the chance of future bypasses.

Teams can prevent similar issues by designing workflow engines with clear trust boundaries and consistent enforcement mechanisms. This includes:

  • Treating templates, variable resolvers, and helper utilities as privileged components that must obey the same security policies as explicit APIs.
  • Conducting threat modeling focused on secondary access paths to secrets and credentials (templating, debug tools, system helpers).
  • Using centralized secret management rather than relying on environment variables for high-value credentials.
  • Embedding policy checks and security tests into development and review processes so that new features cannot bypass existing protective controls.
Find out what's already
exploitable in your codebase.