CVE-2026-45311
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedCodeWhale 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThe CodeWhale coding agent's run_tests tool auto-executes cargo test without user approval (ApprovalRequirement::Auto). Since cargo test compiles and runs arbitrary code (test binaries, build.rs scripts, proc macros), a malicious repository can execute shell commands, exfiltrate credentials, or establish persistence with zero user interaction. AGENTS.md can also instruct the model to proactively run tests at session start.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- 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
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check CodeWhale installation and versionRun 'codewhale --version' or check the installed package version using your system's package managerAffected if The installed version is lower than 0.8.23 or cannot be determined (unknown version)
-
Identify run_tests tool configurationInspect the CodeWhale configuration files or settings for the run_tests tool; check if it is listed as an available tool with ApprovalRequirement::AutoAffected if The run_tests tool exists and is set to auto-approve without user interaction (ApprovalRequirement::Auto)
-
Search for AGENTS.md in workspaceLook for AGENTS.md files in the current working directory and parent directories using 'find . -name AGENTS.md' or similar file searchAffected if An AGENTS.md file exists that instructs the model to run tests automatically at session start
-
Review test execution behaviorIf possible, examine the tool's approval configuration or logs to confirm whether cargo test commands execute without prompting the userAffected if Cargo test commands execute without requiring user approval or confirmation
A user is affected if CodeWhale version is below 0.8.23 AND the run_tests tool is configured with auto-approval (ApprovalRequirement::Auto), especially when working with untrusted repositories or when AGENTS.md instructs automatic test execution.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade to CodeWhale version 0.8.23 or later which implements proper approval requirements for test execution.
0.8.23 or later
- Check the current installed version of CodeWhale by running `codewhale --version` or checking your package manager
- Upgrade CodeWhale to version 0.8.23 or later using your package manager (e.g., `pip install --upgrade codewhale`, `cargo install codewhale`, or your system package manager)
- Verify the upgrade was successful by running `codewhale --version` to confirm the installed version is 0.8.23 or higher
- Ensure that any existing AGENTS.md files in repositories are reviewed for malicious instructions to run tests automatically
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation1.0 h
- Implementation1.0 h
- Testing2.0 h
- Review / QA1.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,376.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-45311 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-45311 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data