CVE-2025-67509
JSON

8.2high

MySQLSelectTool Read-Only Bypass via SELECT INTO OUTFILE Allows Arbitrary File Write

Severity
8.2high CVSS:3.1 by GitHub_M
Exploit likelihood
0.31% (higher than 26% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-j8g6-5gqc-mq36

Description

Neuron is a PHP framework for creating and orchestrating AI Agents. Versions 2.8.11 and below use MySQLSelectTool, which is vulnerable to Read-Only Bypass. 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., via prompt injection through a public agent endpoint) may write arbitrary files to 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). This issue is fixed in version 2.8.12.

Affected

Product or packageVersionsReported by
neuron-core neuron-ai< 2.8.12CVE List
neuron-core/neuron-ai (Packagist)before 2.8.12GitHub Advisory Database
neuron-ai neuronbefore 2.8.12NVD

All scores

GitHub_M8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N
GitHub8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N

Classification

CWE-94

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

Neuron is a PHP framework for creating and orchestrating AI Agents. Versions 2.8.11 and below use MySQLSelectTool, which is vulnerable to Read-Only Bypass. 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., via prompt injection through a public agent endpoint) may write arbitrary files to 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). This issue is fixed in version 2.8.12.

GitHub Advisory Database
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.

NVD (es)

Neuron es un framework PHP para crear y orquestar Agentes de IA. Las versiones 2.8.11 e inferiores usan MySQLSelectTool, que es vulnerable a un Bypass de Solo Lectura. MySQLSelectTool está diseñada para ser una herramienta SQL de solo lectura (por ejemplo, para consultas de agentes LLM), sin embargo, la validación basada en la primera palabra clave (por ejemplo, SELECT) y una lista de palabras clave prohibidas no bloquea construcciones de escritura de archivos como INTO OUTFILE / INTO DUMPFILE. Como resultado, un atacante que puede influir en la entrada de la herramienta (por ejemplo, a través de inyección de prompt a través de un endpoint de agente público) puede escribir archivos arbitrarios en el servidor de la base de datos si la cuenta de MySQL/MariaDB tiene el privilegio FILE y la configuración del servidor permite escrituras en una ubicación útil (por ejemplo, un directorio accesible por web). Este problema está solucionado en la versión 2.8.12.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-67509 changed 2025-12-11CVE Terms of Use
GitHub Advisory DatabaseGHSA-j8g6-5gqc-mq36 changed 2025-12-11CC-BY-4.0
NVDCVE-2025-67509 changed 2026-09-25Public domain