Flyto2 Core: LLM/API keys leak to an attacker-controlled base_url
概要
Flyto2 Core: LLM/API keys leak to an attacker-controlled base_url
原文の説明
取得元が公開している説明をそのまま載せています (多くは英語)。
Summary
llm.chat reads the operator's provider key from the environment (OPENAI_API_KEY, ANTHROPIC_API_KEY, ...) and sends it in the Authorization: Bearer header to base_url, a parameter the caller controls. base_url is only checked against the SSRF guard, and the guard allows any public host, so pointing base_url at an attacker's server hands them the operator's key. flyto-core's own bounty scale rates "environment access exposing secrets (e.g. ANTHROPIC_API_KEY)" as High.
Affected code
src/core/modules/atomic/llm/chat.py (_call_openai):
base_url = params.get('base_url') # caller-controlled
if base_url:
validate_url_with_env_config(base_url) # SSRF check only; a public attacker host passes
if not api_key:
api_key = os.getenv('OPENAI_API_KEY') # operator's key
...
url = (base_url or "https://api.openai.com/v1").rstrip('/') + "/chat/completions"
headers = {"Authorization": f"Bearer {api_key}"}
await client.post(url, headers=headers, json=payload) # sent to base_url
The same wiring (env key plus caller endpoint) exists in ai.model (which does not even SSRF-check base_url), llm.agent, and vector.connector (QDRANT_API_KEY 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 keyexfil_poc.py, run with PYTHONPATH=src/src python keyexfil_poc.py. It sets an operator k…
出典: NIST National Vulnerability Database NVD GitHub Advisory
AI要約
外部の AI が作成した要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。
Flyto2 Coreのバージョン2.26.6以前には、OPENAI_API_KEYやANTHROPIC_API_KEYなどのプロバイダキーが環境から読み取られ、calllerが制御するbase_urlにAuthorizationヘッダーとして送信されるため、SSRFガードを通過した場合に攻撃者がキーを取得可能になる脆弱性が存在します。この問題はバージョン2.26.6で修正されています。
Flyto2 Coreにおけるプロバイダキー流出の脆弱性
バージョン2.26.6以前のllm.chatモジュール
攻撃者がプロバイダキーを取得でき、これを使って不正アクセスを行う可能性があるため、重大
バージョン2.26.6にアップデートすること
情報なし
バージョンを確認し、2.26.6以上であることを確認する
影響パッケージ
参照URL
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- package pypi.org
- web github.com
- web github.com
- web github.com