/

CVE-2026-75858

Severity:

HIGH RISK

(7.8)

Code Injection (CWE-94) in CodeWhale rlm_eval Engine

CVE-2026-75858

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

CodeWhale's rlm_eval tool can execute model-supplied Python code without consulting the user's configured approval policy or displaying an approval prompt. If the agent processes attacker-controlled content, such as a web page, repository file, fetched URL, or MCP result, prompt injection may cause arbitrary code to run on the user's machine with the agent's privileges.

Affected context

The vulnerability affects CodeWhale deployments using the rlm_eval tool in versions where its approval behavior is treated as automatic execution. The risk arises when an agent reads untrusted external or local content and that content can influence model-generated tool activity. The companion rlm_open tool may provide a path for staging content that is subsequently processed by the agent.

Exploit preconditions

  • Attack surface: Agent tool execution through rlm_eval
  • Required access: The attacker generally needs to influence content the agent will read, such as a web resource, repository file, or MCP tool response
  • Trigger point: The agent processes attacker-controlled content and invokes rlm_eval
  • Why exploitation is possible: The tool reports an automatic approval requirement, so the engine may execute model-supplied Python code without applying the user's approval policy, confirmation prompt, or audit step

Why this happens

The underlying flaw is an unsafe authorization decision in the tool's approval integration. By returning an automatic-execution requirement, rlm_eval causes the engine to treat code execution as exempt from interactive approval and configured policy checks.

This behavior maps to CWE-94: Improper Control of Generation of Code ('Code Injection'), because attacker-influenced content can affect the generation and execution of Python code in a privileged local process. The insecure pattern is trusting model-generated tool actions without preserving the intended authorization, review, and audit boundary.

Potential impact

  • Arbitrary Python code may execute on the user's machine
  • The process may access resources available to the user's account
  • Local files, credentials, or environment data could be exposed or altered
  • The attacker could establish persistence or affect other development resources
  • Source code, repositories, or connected services could be modified
  • The incident could facilitate further compromise through the agent's permissions

General mitigation guidance

Mitigation generally focuses on preserving approval and authorization controls around code-executing tools.

Common defensive patterns include:

  • Require explicit approval for code execution, rather than treating execution as automatically authorized
  • Ensure configured approval policies are enforced consistently by the execution engine
  • Present clear prompts and record auditable decisions before running model-supplied code
  • Treat web content, repository files, fetched data, and MCP results as untrusted input
  • Restrict agent processes with least-privilege accounts, isolated environments, and limited filesystem and network access
  • Separate content retrieval from code execution and apply policy checks at the final execution boundary
  • Use allowlists or constrained interpreters for workflows that do not require general-purpose Python execution

How teams detect issues like this

Organizations can look for:

  • Static analysis and code review rules that flag tools declaring automatic approval for code execution
  • Tests verifying that configured approval policies are consulted before every execution path
  • Review signals involving model-generated Python, shell, or other interpreter input
  • Audit records showing code execution without an associated approval decision
  • Policy enforcement that blocks unrestricted interpreter access from agent processes
  • Runtime monitoring for unexpected child processes, filesystem changes, network connections, or credential access

Automated security review tools may help identify inconsistent authorization handling and execution paths that bypass confirmation controls.

Sources

SourceLink
github.comgithub.com/Hmbown/CodeWhale/commit/57f3c89471e27ac4032d9791f6885e5d4408c381
github.comgithub.com/Hmbown/CodeWhale/security/advisories/GHSA-wrj3-vj8c-784f
vulncheck.comvulncheck.com/advisories/codewhale-rlm-eval-before-remote-code-execution

Frequently asked

questions

It can be triggered through attacker-controlled content delivered through a web page, fetched URL, repository file, or MCP result, but code executes in the local agent environment rather than on a CodeWhale server.

Not necessarily. The key requirement is the ability to influence content that the agent reads and acts upon. The agent must also have access to the vulnerable execution tool.

Ensure every code-execution path enforces the configured approval policy, requires appropriate user confirmation, and produces an auditable authorization record before execution.

Treat model output and retrieved content as untrusted, isolate agent execution, apply least privilege, and test that no tool can bypass authorization or audit controls.

Find out what's already
exploitable in your codebase.