Code InjectionWeakness · CWE-94

CVE-2026-45311

CRITICAL · 9.6 CVSS v3.1 Published 2026-05-28
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges

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 · unedited
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.

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 confidence

The 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.

MitigationUpgrade to CodeWhale version 0.8.23 or later which implements proper approval requirements for test execution.

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 checks

Work through these to decide whether this CVE applies to you.

  1. Check CodeWhale installation and version
    Run 'codewhale --version' or check the installed package version using your system's package manager
    Affected if The installed version is lower than 0.8.23 or cannot be determined (unknown version)
  2. Identify run_tests tool configuration
    Inspect the CodeWhale configuration files or settings for the run_tests tool; check if it is listed as an available tool with ApprovalRequirement::Auto
    Affected if The run_tests tool exists and is set to auto-approve without user interaction (ApprovalRequirement::Auto)
  3. Search for AGENTS.md in workspace
    Look for AGENTS.md files in the current working directory and parent directories using 'find . -name AGENTS.md' or similar file search
    Affected if An AGENTS.md file exists that instructs the model to run tests automatically at session start
  4. Review test execution behavior
    If possible, examine the tool's approval configuration or logs to confirm whether cargo test commands execute without prompting the user
    Affected 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.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade to CodeWhale version 0.8.23 or later which implements proper approval requirements for test execution.

Recommended fix High confidence

0.8.23 or later

  1. Check the current installed version of CodeWhale by running `codewhale --version` or checking your package manager
  2. 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)
  3. Verify the upgrade was successful by running `codewhale --version` to confirm the installed version is 0.8.23 or higher
  4. 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.

Have this fixed Scoped from the published advisory
  • Consultation1.0 h
  • Implementation1.0 h
  • Testing2.0 h
  • Review / QA1.0 h
5.0 hours of engineering $860
Get help mitigating

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 locally
dbcve dependency scanner

Check 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-45311 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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