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

CVE-2025-58337: Apache Doris-MCP-Server: Improper Access Control results in bypassing a "read-only" mode

mediumCVSS 4.0 5.3GHSA-m35w-xx8c-6xc7

Apache Doris MCP Server (pip `doris-mcp-server`) before 0.6.0 does not enforce its read-only mode. An attacker with a valid read-only account can make changes that mode should block. Apache recommends upgrading to 0.6.0, which contains the fix.

Published Nov 5, 2025 · Updated Nov 7, 2025 · Analysis Nov 1, 2026

What an attacker can do

The advisory is short: improper access control (CWE-284) lets a user with a read-only account get around the server's read-only restriction and perform modifications. It does not describe the exact request used.

The linked fix commit gives a hint about the code path. It changes execute_sql_for_mcp in doris_mcp_server/utils/query_executor.py, which the execute_sql_query tool uses, so that SQL is validated by DorisSecurityManager.validate_sql_security against a read_only_user context before it runs. It replaces a hardcoded MockAuthContext that granted data_analyst with read_data and execute_query. This points to SQL reaching the database without a proper read-only check, but the advisory itself does not say so.

The attacker needs a working account on the MCP server and network access to it. They do not need admin rights. They can then change data in the Doris cluster behind the server, such as inserting, updating or deleting rows, through the same tool interface an AI agent uses. A prompt-injected agent that holds a read-only connection could do the same. The integrity impact is low in the CVSS score, but real for the tables the server can reach.

Who is affected

doris-mcp-server below 0.6.0 (PyPI). The risk applies where the server is set up with read-only access and exposed to users or agents that should not change data. Check the installed version:

pip show doris-mcp-server

doris-mcp-server

Ecosystem
PyPI
Affected
< 0.6.0
Fixed in
0.6.0
Check
pip show doris-mcp-server

How to fix it

Upgrade to doris-mcp-server 0.6.0:

pip install --upgrade "doris-mcp-server>=0.6.0"

The fix commit adds SQL security validation, and it runs only when enable_security_check is true in the server's security configuration. According to the diff, when the security config is missing the code logs a warning and runs the query without validation. So after upgrading, confirm that security checks are enabled in your configuration. As an extra layer, give the Doris account the server uses only SELECT privileges in Doris itself.

How to tell if you were hit

Review Doris audit logs for statements other than SELECT (INSERT, UPDATE, DELETE, ALTER, DROP, CREATE) issued by the account the MCP server uses. Check the MCP server logs for execute_sql_query calls that contain write statements. After upgrading, a blocked query returns error_type: "security_violation", so a spike of those errors means someone is probing. Also check whether the server logs a warning about a missing security configuration at startup.

Beam records MCP tool calls from coding agents, so a write statement sent through execute_sql_query by an agent would appear in its session record.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

An attacker with a valid read-only account can bypass Doris MCP Server’s read-only mode due to improper access control, allowing modifications that should have been prevented by read-only restrictions.

Impact:

Bypasses read-only mode; attackers with read-only access may perform unauthorized modifications.

Recommended action for operators: Upgrade to version 0.6.0 as soon as possible (this release contains the fix).

Credited to lirantal.

Questions

Which version of doris-mcp-server fixes CVE-2025-58337?

0.6.0. Apache's guidance is to upgrade to it as soon as possible.

Does the attacker need an account?

Yes, a valid read-only account. The flaw lets that account do things the read-only mode should have blocked.

Is upgrading enough?

The fix commit runs its SQL validation only when enable_security_check is on, and skips it when the security config is missing. Verify that setting after upgrading, and limit the database account's privileges as well.

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