Summary
MindsDB Minds Platform contains an unauthenticated code-injection flaw in the Anton agent's scratchpad functionality, where attacker-influenced Python source can reach an unsandboxed execution path. A remote attacker may submit crafted requests to execute operating-system commands with the privileges of the desktop application, particularly when the affected endpoints are reachable and unprotected.
Affected context
The issue occurs in Minds Platform deployments where the responses API and settings API are exposed without authentication and the Anton agent can access its scratchpad tool. Risk is greatest when the application runs with access to local files, SSH material, stored credentials, environment secrets, or other sensitive operating-system resources.
Exploit preconditions
- Attack surface: HTTP API endpoints exposed by the Minds Platform service - Required access: No valid credentials may be required when the affected
endpoints are unprotected
- Trigger point: Agent processing of attacker-controlled prompts that can
reach the scratchpad execution capability
- Supporting condition: The agent's execution path evaluates attacker-
influenced Python source without an effective sandbox or policy boundary
- Why exploitation is possible: Input is allowed to influence executable
code, and the resulting process inherits the permissions of the running
application
Why this happens
The underlying bug is a code-injection condition in which untrusted agent input can influence Python source passed to an execution primitive such as exec(). Because the scratchpad tool does not impose a reliable sandbox, capability restriction, or safe interpretation boundary, data supplied through the agent workflow can become executable logic. This behavior maps to CWE-94, Improper Control of Generation of Code, rather than merely unsafe input handling.
Potential impact
- An attacker may execute arbitrary operating-system commands.
- The application process could be fully compromised.
- Local files, SSH keys, stored credentials, and environment secrets may be exposed.
- Attackers could tamper with application data or configuration.
- The host or connected services could be used for further compromise.
- Confidentiality, integrity, and availability of the deployment could be affected.
General mitigation guidance
Mitigation generally centers on removing the ability for untrusted prompts or model output to become executable source code. Secure-by-default designs should replace general-purpose execution with narrowly defined, allowlisted operations and enforce authentication and authorization on every management and inference endpoint. Input trust should be reduced through strict validation, explicit tool schemas, output handling that treats model content as data, and independent policy checks before any tool invocation. If execution is unavoidable, strong isolation, restricted capabilities, read-only access where practical, secret separation, network egress controls, and least-privilege service accounts can limit impact.
How teams detect issues like this
Detection programs can review routes for missing authentication, trace prompt-to-tool data flows, and flag execution primitives such as exec(), eval(), dynamic imports, and shell-spawning APIs. Code review should examine whether model output or request data can select tools, construct source code, or cross a trust boundary without policy enforcement. Runtime monitoring can alert on unexpected child processes, shell activity, sensitive-file access, unusual outbound connections, and changes to agent settings. Static analysis and automated security review tools may help enforce policies against dynamic code execution and unauthenticated administrative endpoints.

