Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.4%top 70%

CVE-2026-45311: CWE-94: Improper Control of Generation of Code ('Code Injection') in Hmbown CodeWhale

0
Critical
VulnerabilityCVE-2026-45311cvecve-2026-45311cwe-94
Published: 05/28/2026 (05/28/2026, 17:32:26 UTC)
Source: CVE Database V5
Vendor/Project: Hmbown
Product: CodeWhale

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.

CVSS v3.1

Score 9.6critical

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Affected software

crates.iomore threats →ai
github/Hmbown/codewhale
pkg:cargo/github/Hmbown/codewhale
Affected versions
<0.8.23

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/04/2026, 20:39:04 UTC

Technical Analysis

Hmbown CodeWhale versions from 0.3.0 to before 0.8.23 include a vulnerability (CWE-94) where the run_tests tool executes 'cargo test' with ApprovalRequirement::Auto, bypassing user approval. Since 'cargo test' compiles and runs arbitrary code including test binaries, build scripts, and procedural macros, this design choice creates a security boundary inconsistency. Malicious code in a repository can leverage this to execute arbitrary shell commands, steal credentials, or maintain persistence without user interaction. The AGENTS.md file can further automate this exploitation by instructing the model to run tests at session start. The vulnerability is resolved in version 0.8.23.

Potential Impact

Successful exploitation allows an attacker to execute arbitrary code on the system running CodeWhale without user approval, potentially leading to credential theft, system persistence, and full compromise of confidentiality, integrity, and availability. The CVSS v3.1 score is 9.6 (critical), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, and high impact on confidentiality, integrity, and availability. No known exploits in the wild have been reported.

Mitigation Recommendations

This vulnerability is fixed in CodeWhale version 0.8.23. Users should upgrade to version 0.8.23 or later to remediate the issue. Patch status is not explicitly confirmed in the vendor advisory, but the description states the vulnerability is fixed in 0.8.23. Until upgrading, users should avoid running CodeWhale on untrusted repositories or disable automatic test execution if possible.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-05-11T20:50:30.538Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a188377e29bf47b50179037

Added to database: 05/28/2026, 18:03:35 UTC

Last enriched: 06/04/2026, 20:39:04 UTC

Last updated: 07/31/2026, 19:22:59 UTC

Views: 102

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses