Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-45311

CodeWhale: run_tests Tool Enables RCE via Malicious Repository Without Approval
Back to all
CVE

CVE-2026-45311

CodeWhale: run_tests Tool Enables RCE via Malicious Repository Without Approval

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.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
9.6
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
C
H
U
-

Related Resources

No items found.

References

https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45311.json, https://github.com/Hmbown/CodeWhale/security/advisories/GHSA-wx44-2q6h-j6p8, https://nvd.nist.gov/vuln/detail/CVE-2026-45311

Severity

9.6

CVSS Score
0
10

Basic Information

Base CVSS
9.6
EPSS Probability
0.00375%
EPSS Percentile
0.3043%
Introduced Version
3204f556af2cf5f0bcc604fb9fd230b3a5a2e965
Fix Available
cfb5f08ae515f8dcf93aa10bdcf37dff3549e7ec

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading