ghsa-j8g6-5gqc-mq36
Vulnerability from github
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
MySQLSelectToolfor any agent reachable from untrusted input. -
Ensure DB account used by the tool does not have
FILEprivilege. -
Ensure
secure_file_privis 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.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 2.8.11"
},
"package": {
"ecosystem": "Packagist",
"name": "neuron-core/neuron-ai"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.8.12"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-67509"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2025-12-09T17:19:23Z",
"nvd_published_at": "2025-12-10T23:15:48Z",
"severity": "HIGH"
},
"details": "### 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.",
"id": "GHSA-j8g6-5gqc-mq36",
"modified": "2025-12-11T15:49:01Z",
"published": "2025-12-09T17:19:23Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/neuron-core/neuron-ai/security/advisories/GHSA-j8g6-5gqc-mq36"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-67509"
},
{
"type": "WEB",
"url": "https://github.com/neuron-core/neuron-ai/commit/72735d0ea133266cf2f5d5d195d41e9dd865289a"
},
{
"type": "PACKAGE",
"url": "https://github.com/neuron-core/neuron-ai"
},
{
"type": "WEB",
"url": "https://github.com/neuron-core/neuron-ai/releases/tag/2.8.12"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Neuron MySQLSelectTool \u201cread-only\u201d bypass via `SELECT ... INTO OUTFILE` (file write \u2192 potential RCE)"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.