CodeWhale: SSRF via HTTP Redirect Bypass in fetch_url Tool
Hmbown CodeWhale
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| deepseek-tui crates.io |
|
|
| deepseek-tui-cli crates.io |
|
|
| deepseek-tui npm |
Hmbown CodeWhale
| Product | Affected | Fixed in |
|---|---|---|
| deepseek-tui crates.io |
|
|
| deepseek-tui-cli crates.io |
|
|
| deepseek-tui npm |
< 0.8.22
|
CodeWhale is a DeepSeek + MiMo coding agent in terminal. Prior to 0.8.22, the fetch_url tool validates the initial URL's resolved IP address against a restricted-IP blocklist (is_restricted_ip()) to prevent SSRF attacks against internal services (cloud metadata endpoints, localhost, private networks). However, the HTTP client (reqwest) is configured to automatically follow up to 5 redirects (reqwest::redirect::Policy::limited(5)) without re-validating the redirect target against the same SSRF protections. This vulnerability is fixed in 0.8.22.
From the CVE record · GitHub_M
Before 0.8.22, CodeWhale’s fetch_url tool checks the initial URL against a restricted-IP blocklist but does not check redirect targets. If fetch_url requests a URL that redirects, the HTTP client can follow it to an internal service. The input does not specify authentication or user-interaction requirements.
Anyone running CodeWhale through the crates.io deepseek-tui or deepseek-tui-cli packages, or the npm deepseek-tui package, at a version before 0.8.22 should check.