{"id":"CVE-2025-67509","aliases":["CVE-2025-67509","GHSA-j8g6-5gqc-mq36"],"related":[],"kind":"vulnerability","state":"published","title":"MySQLSelectTool Read-Only Bypass via SELECT INTO OUTFILE Allows Arbitrary File Write","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\n`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`.  \n\nAs 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.\n\nIf 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).\n\n**Who is impacted:** Deployments that expose an agent using `MySQLSelectTool` to untrusted input and run with overly-permissive DB privileges/configuration.\n\n### Patches\n\n**Not patched in:** 2.8.11  \n\n**Fixed in:** 2.8.12\n\nRecommended fix direction:\n\n- Explicitly reject queries containing: `INTO`, `OUTFILE`, `DUMPFILE`, `LOAD_FILE`, and other file/IO-related functions/clauses.\n\n- Prefer AST-based validation (SQL parser) over keyword checks.\n\n- Constrain allowed tables/columns and disallow multi-statements.\n\n### Workarounds\n\nIf you cannot upgrade immediately:\n\n- Remove/disable `MySQLSelectTool` for any agent reachable from untrusted input.\n\n- Ensure DB account used by the tool **does not** have `FILE` privilege.\n\n- Ensure `secure_file_priv` is set to a directory that is **not** web-accessible (or restrict it tightly).\n\n- Add a defensive query filter at the application layer rejecting `INTO OUTFILE`, `INTO DUMPFILE`, `LOAD_FILE`, `;` (multi-statements), and suspicious comment patterns.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-12-09T17:19:23.000Z","modified":"2026-09-25T23:10:00.463Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N","score":8.2,"rating":"HIGH"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"version":"< 2.8.12","status":"affected"}],"vendor":"neuron-core","product":"neuron-ai","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.8.12"}],"ecosystem":"Packagist","package":"neuron-core/neuron-ai","purl":"pkg:composer/neuron-core/neuron-ai","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.8.12"}],"vendor":"neuron-ai","product":"neuron","cpe":"cpe:2.3:a:neuron-ai:neuron:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/neuron-core/neuron-ai/security/advisories/GHSA-j8g6-5gqc-mq36","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/neuron-core/neuron-ai/commit/72735d0ea133266cf2f5d5d195d41e9dd865289a","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/neuron-core/neuron-ai/releases/tag/2.8.12","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-67509","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/neuron-core/neuron-ai","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-12-11T15:36:45.498Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-67509","url":"https://www.cve.org/CVERecord?id=CVE-2025-67509","licence":"CVE Terms of Use","modified":"2025-12-11T15:37:08.650Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-j8g6-5gqc-mq36","url":"https://github.com/advisories/GHSA-j8g6-5gqc-mq36","licence":"CC-BY-4.0","modified":"2025-12-11T16:22:53.967Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-67509","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-67509","licence":"Public domain","modified":"2026-09-25T23:10:00.463Z"}],"updatedAt":"2026-11-25T22:59:09.211Z","epss":{"score":0.00313,"percentile":0.26109,"date":"2026-12-01T12:00:22.000Z"}}