Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

CVE-2025-59333 — @executeautomation/databa…

HIGH

CVE-2025-59333 is a high-severity (CVSS 8.1) CWE-284 vulnerability in @executeautomation/database-server. No vendor fix is recorded yet; mitigation options are listed below.

@executeautomation/database-server does not properly restrict access, bypassing a "read-only" mode

Published
Sep 16, 2025
Updated
Sep 16, 2025
Affected
1 pkg
Patched
None yet
Exploits
None indexed
Exploitation data as of Sep 24, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for CVE-2025-59333.

EPSS Exploitation Probability

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs30th percentile — riskier than 30% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

CVE-2025-59333 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 378,567 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

1other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@executeautomation/database-servernpm
575downloads / week

Description

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.

This MCP Server is also publicly published in the npm registry: https://www.npmjs.com/package/@executeautomation/database-server

Vulnerable code

The vulnerable code to SQL injection takes shape in several ways:

  • startsWith("SELECT") can include multiple queries because the pg driver for the client.query() supports multi queries if terminated with a ;
  • startsWith("SELECT") can include denial of service queries for stored procedures and other internal db functions

The tool call here in index.ts is vulnerable:

// Handle tool calls
server.setRequestHandler(CallToolRequestSchema, async (request) => {
  switch (request.params.name) {
    case "read_query": {
      const query = request.params.arguments?.query as string;
      
      if (!query.trim().toLowerCase().startsWith("select")) {
        throw new Error("Only SELECT queries are allowed with read_query");
      }

      try {
        const result = await dbAll(query);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
          isError: false,
        };
      } catch (error: any) {
        throw new Error(`SQL Error: ${error.message}`);
      }
    }

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

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

Exploitation

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

Several examples that will allow side effects through SELECT queries:

  1. Stored procedures: SELECT some_function_that_updates_data();
  2. Internal database administrative operations: SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE ...;

Even 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().

Following is a reproduction:

  • Simulate a long-running query, for example: query = "SELECT pg_sleep(5 * 60)"
  • 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
  • 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

Similar database side-effects may be found in MySQL or SQLite.

Impact

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

Recommendation

  • Don't rely solely on the "starts with" SELECT
  • Strict access to specific tables that the user is only authorized to query for
  • Do not allow multiple SQL queries to be chained together like SELECT * ...; INSERT INTO ...
  • 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.

CVE Details

Recommended CWE: CWE-284: Improper Access Control Recommendec CVSS: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

References and Prior work

  1. GitHub Kanban MCP Server found vulnerable to command injection.
  2. iOS Simulator MCP Server found vulnerable to command injection.
  3. Liran's Node.js Secure Coding for educational materials on injection attacks and secure coding practices.
  4. How to Bypass Access Control in PostgreSQL in Simple PSQL MCP Server for SQL Injection
  5. 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:

Cursor defined MCP Server vulnerable to command injection

Credit

Disclosed by Liran Tal

Affected Packages

1 total
EcosystemPackageVulnerable rangeFix
📦npm@executeautomation/database-serverall versionsNo fix

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @executeautomation/database-server, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Remediation status

    No patched version of @executeautomation/database-server has shipped for CVE-2025-59333 yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.

  3. Mitigate without a patch

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2025-59333 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2025-59333. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

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 functiona
O3 Security · Impact-Aware SCA

Is CVE-2025-59333 in your dependencies?

O3 Security finds CVE-2025-59333 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2025-59333: High 8.1 severity | O3 Security