{"id":"CVE-2026-45311","state":"PUBLISHED","title":"CodeWhale: run_tests Tool Enables RCE via Malicious Repository Without Approval","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.","publishedAt":"2026-05-28T17:32:26.950Z","updatedAt":"2026-06-01T19:09:50.099Z","severity":{"score":9.6,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["Hmbown CodeWhale"],"affected":[{"vendor":"Hmbown","product":"CodeWhale","versions":[{"version":">= 0.3.0, < 0.8.23","status":"affected"}]}],"references":["https://github.com/Hmbown/CodeWhale/security/advisories/GHSA-wx44-2q6h-j6p8"],"weaknesses":["CWE-94"],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/45xxx/CVE-2026-45311.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-45311","state":"PUBLISHED","datePublished":"2026-05-28T17:32:26.950Z","dateUpdated":"2026-06-01T19:09:50.099Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-05-11T20:50:30.538Z"},"containers":{"cna":{"title":"CodeWhale: run_tests Tool Enables RCE via Malicious Repository Without Approval","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Hmbown","product":"CodeWhale","versions":[{"version":">= 0.3.0, < 0.8.23","status":"affected"}]}],"references":[{"url":"https://github.com/Hmbown/CodeWhale/security/advisories/GHSA-wx44-2q6h-j6p8","name":"https://github.com/Hmbown/CodeWhale/security/advisories/GHSA-wx44-2q6h-j6p8","tags":["x_refsource_CONFIRM"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":9.6,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-94","lang":"en","description":"CWE-94: Improper Control of Generation of Code ('Code Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-05-28T17:32:26.950Z"},"source":{"advisory":"GHSA-wx44-2q6h-j6p8","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/Hmbown/CodeWhale/security/advisories/GHSA-wx44-2q6h-j6p8","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-01T19:09:32.481506Z","id":"CVE-2026-45311","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-01T19:09:50.099Z"}}]}}}