LiveActive security incident?Get immediate response
CVE Record

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.

CriticalCVSS 9.6Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

CVE-2026-45311 lets a malicious repository make CodeWhale run test code without asking the user. Because Rust tests, build scripts, and proc macros can execute code, this can lead to credential theft, persistence, or full host compromise when a user opens or works in a hostile repo.

Executive priority

Prioritize remediation for developer machines handling source code, secrets, or customer systems. The business risk is high because normal agent behavior can become code execution without an approval prompt.

Technical view

CodeWhale versions >=0.3.0 and <0.8.23 run the run_tests tool with ApprovalRequirement::Auto, executing cargo test without approval. cargo test can compile and execute arbitrary repository code, including test binaries, build.rs scripts, and proc macros. AGENTS.md auto-loading can increase risk by prompting proactive test execution.

Likely exposure

Exposure is likely limited to teams using CodeWhale versions before 0.8.23, especially on developer workstations or CI-like environments that open untrusted or external repositories.

Exploitation context

The source bundle does not report active exploitation, and KEV is false. Exploitation requires user interaction with a malicious repository, but no further privilege is required once CodeWhale auto-runs tests in that workspace.

Researcher notes

The core boundary issue is auto-approved test execution in a coding agent. Evidence supports arbitrary code execution through Rust test/build mechanisms and AGENTS.md prompt influence, but sources do not provide exploit telemetry or broader product impact.

Mitigation direction

  • Upgrade CodeWhale to version 0.8.23 or later.
  • Avoid using affected CodeWhale versions with untrusted repositories.
  • Do not run affected versions where developer credentials or production secrets are available.
  • Review the GitHub advisory for any updated vendor guidance.
  • Treat exposed tokens as potentially compromised if tests ran in a malicious workspace.

Validation and detection

  • Inventory CodeWhale installations and identify versions >=0.3.0 and <0.8.23.
  • Confirm upgraded systems report CodeWhale version 0.8.23 or later.
  • Review session history for automatic run_tests or cargo test execution in untrusted repositories.
  • Check whether affected sessions had access to credentials, tokens, SSH keys, or cloud secrets.
  • Look for unexpected persistence or outbound activity after suspicious CodeWhale sessions.
Prepared
Confidence
high
Sources
3

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-94: Code execution behavior lookup

Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-45311 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
9.6 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
1ADP providers
2Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: noTechnical Impact: total

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.6CVSS 3.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H2.86GitHub_M

Vulnerability scoring details

Base CVSS 3.1 score

9.6Critical
CVSS 3.1 vector shape for CVE-2026-45311Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
HmbownCodeWhale>= 0.3.0, < 0.8.23Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-94 · source CWE mapping

Improper Control of Generation of Code ('Code Injection')

Improper Control of Generation of Code ('Code Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.