Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. deepseek-tui
  4. ›
  5. CVE-2026-45311

CVE-2026-45311: DeepSeek TUI: run_tests Tool Enables RCE via Malicious Repository Without Approval

May 14, 2026 (updated June 9, 2026)

The run_tests tool executes cargo test in the workspace with ApprovalRequirement::Auto, meaning it runs without any user approval prompt. The source code explicitly states this design choice:

fn approval_requirement(&self) -> ApprovalRequirement {
// Tests are encouraged, so avoid gating them behind approval.
ApprovalRequirement::Auto
}

cargo test compiles and executes arbitrary code: test binaries, build.rs build scripts, and proc macros. While auto-approving test execution is a deliberate design choice, it creates an inconsistency in the security boundary. However, in a malicious repository, test code can execute arbitrary shell commands, exfiltrate credentials, or establish persistence with zero approval.

The attack is amplified by AGENTS.md (auto-loaded into the system prompt), which can instruct the model to run tests proactively at session start.

References

  • github.com/Hmbown/CodeWhale/security/advisories/GHSA-wx44-2q6h-j6p8
  • github.com/Hmbown/DeepSeek-TUI/releases/tag/v0.8.23
  • github.com/Hmbown/DeepSeek-TUI/security/advisories/GHSA-wx44-2q6h-j6p8
  • github.com/advisories/GHSA-wx44-2q6h-j6p8
  • nvd.nist.gov/vuln/detail/CVE-2026-45311

Code Behaviors & Features

Detect and mitigate CVE-2026-45311 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 0.3.0 before 0.8.23

Fixed versions

  • 0.8.23

Solution

Upgrade to version 0.8.23 or above.

Impact 9.6 CRITICAL

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

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

cargo/deepseek-tui/CVE-2026-45311.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:03 +0000.