# CVE-2025-67509: MySQLSelectTool Read-Only Bypass via SELECT INTO OUTFILE Allows Arbitrary File Write

> Attackers can bypass read-only SQL restrictions to write arbitrary files on the server via prompt injection, potentially leading to code execution.

- **Severity:** High 8.2 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Dec 2025
- **Updated:** 11 Dec 2025
- **Also known as:** GHSA-j8g6-5gqc-mq36

## What is CVE-2025-67509?

CVE-2025-67509 is a high-severity code injection vulnerability in neuron-core neuron-ai, published on 10 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2025-67509?

2 open source packages ship an affected version, including neuron-core/neuron-ai. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `neuron-core/neuron-ai` | Packagist | All versions | 2.8.12 |
| `neuron-core/neuron-ai` | Packagist | All versions | 2.8.12 |

Products: Neuron-Ai Neuron.

## How do I fix CVE-2025-67509?

Upgrade neuron-core/neuron-ai to 2.8.12 or later.

## Is CVE-2025-67509 being exploited?

There is no known exploitation of CVE-2025-67509 in the wild and no public exploit code.

## Other vulnerabilities in neuron-core neuron-ai

- [CVE-2025-67510](https://insights.sbomify.com/CVE-2025-67510/): MySQLWriteTool allows arbitrary/destructive SQL when exposed to untrusted prompts (agent “footgun”) (critical 9.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-67509 and fix it if it is affected.

What it is: CVE-2025-67509 is a high-severity code injection vulnerability in neuron-core neuron-ai, published on 10 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-67509 in the wild and no public exploit code.

Affected packages and fixed versions:
- neuron-core/neuron-ai (Packagist): affected all versions; fixed in 2.8.12
- neuron-core/neuron-ai (Packagist): affected all versions; fixed in 2.8.12

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-67509/ (Markdown: https://insights.sbomify.com/CVE-2025-67509/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-67509
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-67509
- OSV: https://osv.dev/vulnerability/CVE-2025-67509

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-67509/
Summaries are generated and may contain mistakes; the official description above is the record.
