NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

CVE-2025-66335: Apache Doris MCP Server vulnerable to SQL Injection via improper query context neutralization

mediumCVSS 3.1 5.3GHSA-qhfq-gvvc-5q6q

Apache Doris MCP Server (pip package doris-mcp-server) from 0.1.0 up to 0.6.0 mishandles query context, so unintended SQL statements can run and the intended query validation and access restrictions can be bypassed through the MCP query execution interface. Upgrade to 0.6.1.

Published Apr 20, 2026 · Updated Apr 24, 2026 · Analysis Oct 29, 2026

What an attacker can do

The server exposes Apache Doris to MCP clients, including AI agents, through a query execution interface. It validates queries and applies access restrictions before they reach the database. In affected versions the query context was not neutralized properly (CWE-89), so crafted input could carry SQL the validator was meant to block. The statement then runs with the server's database account.

The CVSS vector is network, no privileges and no user interaction, with low confidentiality impact only. In practice the attacker needs to reach the MCP server, or to steer an agent that does, for example through a prompt injection in data the agent reads. The gain is reading data the restrictions should have hidden. The advisory text does not describe writes or other impact.

The 0.6.1 release notes describe broad SQL injection hardening across the tool modules, with a shared sql_security_utils module that centralizes validation. That suggests several code paths were weak, not just one.

Who is affected

doris-mcp-server from 0.1.0 up to, but not including, 0.6.1. Versions 0.6.1 and later are not affected. Check what you run:

pip show doris-mcp-server

Check every environment where the server runs, including containers and agent hosts.

doris-mcp-server

Ecosystem
PyPI
Affected
>= 0.1.0, < 0.6.1
Fixed in
0.6.1
Check
pip show doris-mcp-server

How to fix it

Upgrade to 0.6.1:

pip install --upgrade doris-mcp-server==0.6.1

The release notes list the SQL injection hardening (pull request 68) and a separate token fix that restores hot reloading of tokens.json (pull request 69). The sources give no workaround. As a general precaution, run the server's Doris account with the least privilege it needs and keep the MCP endpoint off untrusted networks.

How to tell if you were hit

Review Doris audit logs and the MCP server logs for statements that do not match the tools you expect, such as stacked statements, queries against tables outside the intended schema, or SELECT statements by the MCP service account on sensitive tables. The sources give no specific log signature. Beam records MCP tool calls made by AI agents, so you can see which agent sent which query through the server.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Apache Doris MCP Server versions prior to 0.6.1 are affected by an improper neutralization flaw in query context handling that may allow execution of unintended SQL statements and bypass of intended query validation and access restrictions through the MCP query execution interface. Versions 0.6.1 and later are not affected.

Questions

Which doris-mcp-server versions are affected by CVE-2025-66335?

From 0.1.0 up to but not including 0.6.1. Release 0.6.1 and later are not affected.

What can an attacker do?

Run SQL statements that the query validation should have blocked and bypass access restrictions. The CVSS impact is low confidentiality, with no integrity or availability impact.

Is it exploited in the wild?

No source says so, and the record has no CISA KEV data.

Does it need authentication?

The CVSS vector sets privileges required to none. If your deployment puts authentication in front of the server, that limits who can reach it.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries