CVE-2025-67509: Neuron core/neuron ai Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-j8g6-5gqc-mq36
CVSS 8.2
CWE-94
Published
Advisory Summary

CVE-2025-67509 is a HIGH (CVSS 8.2) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Neuron core/neuron ai libraries in the Packagist ecosystem. The issue involves neuron mysqlselecttool “read-only” bypass via `select ... into outfile` (file write → potential rce). Remediation is available by upgrading affected packages to version 2.8.12.

CVE-2025-67509 at a Glance

CVE Identifier CVE-2025-67509
GHSA Identifier GHSA-j8g6-5gqc-mq36
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Neuron core/neuron ai
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2025-67509

To remediate this vulnerability, upgrade all affected Neuron core/neuron ai dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

neuron-core/neuron-ai fixed: 2.8.12
Upgrade neuron-core/neuron-ai to 2.8.12
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for neuron-core/neuron-ai

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-67509, inspect your project dependencies for Neuron core/neuron ai:

inspect dependencies for neuron-core/neuron-ai

Analyze the terminal output to locate any version of Neuron core/neuron ai in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.8.12), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Neuron core/neuron ai, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2025-67509 Affected Neuron core/neuron ai Versions

1 component(s)
Fixed Versions:
2.8.12
Product / Package Ecosystem Affected Versions Fixed Version
neuron-core/neuron-ai
Packagist
< 2.8.12
2.8.12

References

Frequently Asked Questions

What is CVE-2025-67509?
CVE-2025-67509 is a security vulnerability in Neuron core/neuron ai involving Neuron MySQLSelectTool “read-only” bypass via `SELECT ... INTO OUTFILE` (file write → potential RCE) under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Neuron core/neuron ai versions are affected?
Affected versions include releases prior to 2.8.12 across affected packages: neuron-core/neuron-ai.
What version fixes CVE-2025-67509?
Upgrading to 2.8.12 (or the latest patched release for your respective branch) resolves the vulnerability.
Is neuron-core/neuron-ai affected?
Yes, neuron-core/neuron-ai is affected in releases prior to 2.8.12. Upgrade your dependency to 2.8.12 or later.
What is the CVSS score of CVE-2025-67509?
CVE-2025-67509 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N.
What CWE is associated with CVE-2025-67509?
CVE-2025-67509 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Packagist dependencies for CVE-2025-67509?
Run the dependency tree command: 'inspect dependencies for neuron-core/neuron-ai'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j8g6-5gqc-mq36",
  "modified" : "2025-12-11T15:49:01Z",
  "published" : "2025-12-09T17:19:23Z",
  "aliases" : [ "CVE-2025-67509" ],
  "summary" : "Neuron MySQLSelectTool “read-only” bypass via `SELECT ... INTO OUTFILE` (file write → potential RCE)",
  "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "neuron-core/neuron-ai"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.8.12"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.8.11"
    }
  } ],
  "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"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-09T17:19:23Z",
    "nvd_published_at" : "2025-12-10T23:15:48Z"
  }
}