提出 #856875: NousResearch hermes-agent 0.16.0 Server-Side Request Forgery (CWE-918)情報

タイトルNousResearch hermes-agent 0.16.0 Server-Side Request Forgery (CWE-918)
説明# Technical Details An SSRF vulnerability exists in the `save_url_image()` method in `agent/image_gen_provider.py` of hermes-agent. The xAI image generation provider parses provider responses and, when `data[0].url` is present, passes that provider-controlled URL directly to `save_url_image()`. This function performs a raw `requests.get(url, timeout=timeout, stream=True)` without any URL safety validation, no call to `tools.url_safety.is_safe_url`, and no redirect-target revalidation. A malicious or compromised provider can cause the Hermes host to fetch attacker-chosen URLs. # Vulnerable Code File: agent/image_gen_provider.py Method: save_url_image() Why: The function calls `requests.get(url)` on a provider-controlled URL without any SSRF guard, URL allowlist check, or redirect-target revalidation. Unlike user-supplied URLs elsewhere in the codebase, this second-hop fetch skips all safety checks. # Reproduction 1. Set up a localhost xAI-compatible stub service that returns `data[0].url` pointing at `/canary.png`. 2. Configure hermes-agent with `xai` as the image generation provider and `XAI_API_KEY` set to any non-empty value. 3. Call `image_generate` with a prompt. 4. Observe the stub logs show `provider_hits=1` and `canary_hits=1`, confirming the host-side fetch of the provider-controlled URL. # Impact - The Hermes host can be induced to request loopback services, internal HTTP endpoints, or cloud metadata resources. - Unauthorized disclosure of internal network information reachable from the Hermes process. - Bypasses the existing URL safety infrastructure used elsewhere in the codebase.
ソース⚠️ https://gist.github.com/YLChen-007/7c71603a25d84f372f2275dd570e99d4
ユーザー
 Eric-y (UID 95889)
送信2026年06月12日 11:40 (2 月 ago)
モデレーション2026年08月04日 09:35 (2 months later)
ステータス承諾済み
VulDBエントリ385784 [NousResearch hermes-agent 迄 0.16.0 xAI Image Generation Provider image_gen_provider.py save_url_image 特権昇格]
ポイント20

Want to stay up to date on a daily basis?

Enable the mail alert feature now!