Filter by signal
2 neuron CVEs, newest first
Neuron MySQLSelectTool “read-only” bypass via `SELECT ... INTO OUTFILE` (file write → potential RCE) ### Impact `MySQLSelectTool` is intended to be a read-only SQL tool (e.g., for LLM agent querying). However, validation based on the first keyword (e.g., `SELECT`) and a forbidden-keyword list does not block file-writing constructs such as `INTO OUTFILE` / `INTO DUMPFILE`. As a result, an attacker who can influence the tool input (e.g., prompt injection through a public agent endpoint) may be able to write arbitrary content to files on the DB server. If the MySQL/MariaDB account has the `FILE` privilege and server configuration permits writes to a useful location (e.g., a web-accessible directory), the impact can escalate to remote code execution on the application host (for example, by writing a PHP web shell). **Who is impacted:** Deployments that expose an agent using `MySQLSelectTool` to untrusted input and run with overly-permissive DB privileges/configuration. ### Patches **Not patched in:** 2.8.11 **Fixed in:** 2.8.12 Recommended fix direction: - Explicitly reject queries containing: `INTO`, `OUTFILE`, `DUMPFILE`, `LOAD_FILE`, and other file/IO-related functions/clauses. - Prefer AST-based validation (SQL parser) over keyword checks. - Constrain allowed tables/columns and disallow multi-statements. ### Workarounds If you cannot upgrade immediately: - Remove/disable `MySQLSelectTool` for any agent reachable from untrusted input. - Ensure DB account used by the tool **does not** have `FILE` privilege. - Ensure `secure_file_priv` is set to a directory that is **not** web-accessible (or restrict it tightly). - Add a defensive query filter at the application layer rejecting `INTO OUTFILE`, `INTO DUMPFILE`, `LOAD_FILE`, `;` (multi-statements), and suspicious comment patterns.
Neuron MySQLWriteTool allows arbitrary/destructive SQL when exposed to untrusted prompts (agent “footgun”) ### Impact `MySQLWriteTool` executes arbitrary SQL provided by the caller using `PDO::prepare()` + `execute()` without semantic restrictions. This is consistent with the name (“write tool”), but in an LLM/agent context it becomes a high-risk capability: prompt injection or indirect prompt manipulation can cause execution of destructive queries such as `DROP TABLE`, `TRUNCATE`, `DELETE`, `ALTER`, or privilege-related statements (subject to DB permissions). **Who is impacted:** Deployments that expose an agent with `MySQLWriteTool` enabled to untrusted input and/or run the tool with a DB user that has broad privileges. ### Patches **Not patched in:** 2.8.11 Recommended improvements (even if keeping the tool intentionally powerful): - Provide a safer API that supports only constrained operations (e.g., `insertRecord`, `updateRecord`) with allowlisted tables/columns. - Add a policy/allowlist layer (e.g., allow only `INSERT`/`UPDATE` on selected tables; forbid `DROP/TRUNCATE/ALTER/GRANT`). - Add optional review workflow: log + require human approval for high-risk statements; or “dry-run” mode. - Document strongly that the tool must not be exposed to untrusted prompts without additional safeguards. ### Workarounds - Do not enable `MySQLWriteTool` for public/untrusted agents. - Use a dedicated DB user with **least privilege**: - no `DROP`, no `ALTER`, no `GRANT`, no access to sensitive tables unless necessary - Add an application-layer policy rejecting high-risk statements (`DROP`, `TRUNCATE`, `ALTER`, `GRANT`, `REVOKE`, `CREATE USER`, etc.). - Implement authorization gating for tool calls (RBAC, allow tool use only for trusted operators).
