Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-45311— CodeWhale: run_tests Tool Enables RCE via Malicious Repository Without Approval

Quick assessment

Affected
Hmbown CodeWhale
Exploitation
Public or AI PoC available; prioritize validation
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

CodeWhale是Hunter Bown个人开发者的一款终端编码智能体工具。 CodeWhale 0.3.0至0.8.23版本存在代码注入漏洞,该漏洞源于run_tests工具以ApprovalRequirement::Auto执行cargo test,编译和执行任意代码,在恶意仓库中测试代码可执行任意shell命令、窃取凭据或建立持久性,且AGENTS.md可指示模型在会话开始时主动运行测试。

CVSS 9.6 · Critical EPSS 0.38% · P31

Affected Version Matrix 1

VendorProduct Version RangeStatus
Hmbown CodeWhale >= 0.3.0, < 0.8.23 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-45311

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
CodeWhale: run_tests Tool Enables RCE via Malicious Repository Without Approval
Source: CVE Program / CVE List V5
Vulnerability Description
CodeWhale is a DeepSeek + MiMo coding agent in terminal. From 0.3.0 to 0.8.23, the run_tests tool executes cargo test in the workspace with ApprovalRequirement::Auto, meaning it runs without any user approval prompt. 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. This vulnerability is fixed in 0.8.23.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
对生成代码的控制不恰当(代码注入)
Source: CVE Program / CVE List V5
Vulnerability Title
CodeWhale 代码注入漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
CodeWhale是Hunter Bown个人开发者的一款终端编码智能体工具。 CodeWhale 0.3.0至0.8.23版本存在代码注入漏洞,该漏洞源于run_tests工具以ApprovalRequirement::Auto执行cargo test,编译和执行任意代码,在恶意仓库中测试代码可执行任意shell命令、窃取凭据或建立持久性,且AGENTS.md可指示模型在会话开始时主动运行测试。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Hmbown CodeWhale >= 0.3.0, < 0.8.23 -

II. Public POCs for CVE-2026-45311

# POC Description Source Link Shenlong Link
AI-Generated POC Premium
Qwen3.6-35B-A3B · 8578 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2026-45311

登录查看更多情报信息。

Vendor Advisories for CVE-2026-45311 (1)

Same Patch Batch · Hmbown · 2026-05-28 · 4 CVEs total

CVE-2026-45374 9.6 CRITICAL CodeWhale: task_create Insecure Defaults Enable RCE via Prompt Injection in Project Files
CVE-2026-45310 7.4 HIGH CodeWhale: SSRF via HTTP Redirect Bypass in fetch_url Tool
CVE-2026-45373 7.4 HIGH CodeWhale: SSRF‌ IPV6 bypass

IV. Related Vulnerabilities

V. Comments for CVE-2026-45311

No comments yet


Leave a comment