Vulnerabilities in pkg:npm/@executeautomation/database-server
PACKAGECVE-2025-59333 is a HIGH (CVSS 8.1) @executeautomation/database-server does not properly restrict vulnerability (CWE-284: Improper Access Control) affecting @executeautomation/database server libraries in the npm ecosystem. The issue involves @executeautomation/database-server does not properly restrict access, bypassing a "read-only" mode. Remediation is available in the latest vendor maintenance releases.
pkg:npm/@executeautomation/database-server
Vulnerability advisories affecting package pkg:npm/@executeautomation/database-server. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-65hm-pwj5-73pw | CVE-2025-59333 | HIGH | @executeautomation/database-server does not properly restrict access, bypassing a "read-only" mode |
CVE-2025-59333 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H).
How to Fix CVE-2025-59333
To remediate this vulnerability, upgrade all affected @executeautomation/database server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @executeautomation/database-server@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @executeautomation/database-server
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-59333, inspect your project dependencies using npm:
npm ls @executeautomation/database-server
Analyze the terminal output to locate any version of @executeautomation/database server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls @executeautomation/database-server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In @executeautomation/database server, 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
CVE-2025-59333 Affected @executeautomation/database server Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@executeautomation/database-server
|
npm |
≤ 1.1.0
|
|
References
Frequently Asked Questions
What is CVE-2025-59333?
Which @executeautomation/database server versions are affected?
What version fixes CVE-2025-59333?
Is @executeautomation/database-server affected?
What is the CVSS score of CVE-2025-59333?
What CWE is associated with CVE-2025-59333?
How can I check npm dependencies for CVE-2025-59333?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-65hm-pwj5-73pw",
"modified" : "2025-09-16T19:31:56Z",
"published" : "2025-09-16T19:31:56Z",
"aliases" : [ "CVE-2025-59333" ],
"summary" : "@executeautomation/database-server does not properly restrict access, bypassing a \"read-only\" mode",
"details" : "The MCP Server provided by ExecuteAutomation at https://github.com/executeautomation/mcp-database-server provides an MCP interface for agentic workflows to interact with different kinds of database servers such as PostgreSQL database. However, the `mcp-database-server` MCP Server distributed via the npm package `@executeautomation/database-server` fails to implement proper security control that properly enforce a \"read-only\" mode and as such it is vulnerable to abuse and attacks on the affected database servers such as PostgreSQL (and potentially other db servers that expose elevated functionalities) and which may result in denial of service and other unexpected behavior.\n\nThis MCP Server is also publicly published in the npm registry: https://www.npmjs.com/package/@executeautomation/database-server\n\n## Vulnerable code\n\nThe vulnerable code to SQL injection takes shape in several ways:\n- `startsWith(\"SELECT\")` can include multiple queries because the pg driver for the `client.query()` supports multi queries if terminated with a `;`\n- `startsWith(\"SELECT\")` can include denial of service queries for stored procedures and other internal db functions\n\nThe tool call [here in index.ts](https://github.com/executeautomation/mcp-database-server/blob/d6afa4be08eb05343195635fa9462746a6be3a59/index.ts#L272C1-L291C6) is vulnerable:\n\n```\n// Handle tool calls\nserver.setRequestHandler(CallToolRequestSchema, async (request) => {\n switch (request.params.name) {\n case \"read_query\": {\n const query = request.params.arguments?.query as string;\n \n if (!query.trim().toLowerCase().startsWith(\"select\")) {\n throw new Error(\"Only SELECT queries are allowed with read_query\");\n }\n\n try {\n const result = await dbAll(query);\n return {\n content: [{ type: \"text\", text: JSON.stringify(result, null, 2) }],\n isError: false,\n };\n } catch (error: any) {\n throw new Error(`SQL Error: ${error.message}`);\n }\n }\n```\n\nThe MCP Server exposes the tool `read_query` with a naive attempt to guard for exclusive \"read-only\" mode that allows only data retrieval from the server by performing a check on the provided query string to ensure that it starts with a \"SELECT\" query.\n\nIn short, the code check `startWith(\"select\")` is not an adequate security control to strict for read-only mode queries and can be abused for side-effects and database-level operations.\n\n## Exploitation\n\nWhile allowing only `SELECT` type queries might seem like a good defense to allow only data retrieval and not data manipulation in any way (hence, \"read-only\" mode), it is a non-suficient way of protecting against database servers that expose extra functionality through internal function calls.\n\nSeveral examples that will allow side effects through `SELECT` queries:\n1. Stored procedures: `SELECT some_function_that_updates_data();`\n2. Internal database administrative operations: `SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE ...;`\n\nEven when the database is known not to have any stored procedures defined, an attacker can still cause significant availability and service disruption by executing `pg_terminate_backend()`.\n\nFollowing is a reproduction:\n\n- Simulate a long-running query, for example: `query = \"SELECT pg_sleep(5 * 60)\"`\n- Now, from the MCP programmatic interface, execute the following query `SELECT pid, usename, state, query FROM pg_stat_activity;` to get the PID for the long running query\n- Next, use the same MCP interface to then request to run the following query: `SELECT pg_terminate_backend(PID);` and observe the long running query is now terminated\n\nSimilar database side-effects may be found in MySQL or SQLite.\n\n## Impact\n\nThe above exploitation surfaces two significant security risks: a denial of service that affects availability and confidentiality dislcosure that allows users unauthorized access to queries running on the server and potential leak of data.\n\n## Recommendation\n\n- Don't rely solely on the \"starts with\" `SELECT`\n- Strict access to specific tables that the user is only authorized to query for\n- Do not allow multiple SQL queries to be chained together like `SELECT * ...; INSERT INTO ...`\n- Require users that adopt this MCP Server to use fine-grained permissions on the database server with strict and explicit access to specific capabilities on the server.\n\n## CVE Details\n\nRecommended CWE: CWE-284: Improper Access Control\nRecommendec CVSS: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H\n\n## References and Prior work\n\n1. GitHub Kanban MCP Server found [vulnerable to command injection](https://github.com/advisories/GHSA-6jx8-rcjx-vmwf).\n2. iOS Simulator MCP Server found [vulnerable to command injection](https://github.com/advisories/GHSA-6f6r-m9pv-67jw).\n3. Liran's [Node.js Secure Coding](https://www.nodejs-security.com/book/command-injection) for educational materials on injection attacks and secure coding practices.\n4. [How to Bypass Access Control in PostgreSQL in Simple PSQL MCP Server for SQL Injection](https://www.nodejs-security.com/blog/how-to-bypass-access-control-in-postgresql-in-simple-psql-mcp-server-for-sql-injection)\n5. Reference example from prior security research on this topic, demonstrating how vulnerable MCP Server connected to Cursor is abused with prompt injection to bypass the developer's intended logic:\n\n\n\n## Credit\n\nDisclosed by [Liran Tal](https://lirantal.com)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@executeautomation/database-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/executeautomation/mcp-database-server/security/advisories/GHSA-65hm-pwj5-73pw"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59333"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/executeautomation/mcp-database-server"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-284" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-16T19:31:56Z",
"nvd_published_at" : "2025-09-16T15:15:46Z"
}
}