Skip to content

CVE-2026-85788: awslabs mysql-mcp-server Comment-Bypass Mutation Vulnerability

HERMES

HERMES THREAT SCORE & AGENTIC INFRASTRUCTURE ASSESSMENT

Target: awslabs mysql-mcp-server (awslabs.mysql_mcp_server.query_guard (SQL Mutation Detector))
Confidence: 98%
84 / 100
HIGH

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 19 / 20
Threat Activity 18 / 20
Weaponization 18 / 20
Exposure 18 / 20
Prevalence 17 / 20
Impact 17 / 20
Exploit Maturity 18 / 20
Attack Chain Potential 18 / 20
โš–๏ธ Divergence & Operational Rationale

CVSS v3.1 rates this at 8.2 (High). Hermes Threat Score assigns 84 (HIGH). In an agentic environment where LLMs are granted access to enterprise relational databases, bypassing the read-only guard enables prompt injections to modify and wipe critical operational tables.

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2026-85788: awslabs mysql-mcp-server Comment-Bypass Mutation VulnerabilityVULNERABILITY

Connected Nodes: 1
Active Relationships (Outgoing)
→ affectsPRODUCTOracle MySQL Server & Database Engine
98% VERY_HIGH

Software platform affected by security vulnerabilities and agentic attack patterns.

๐Ÿ” Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in Oracle MySQL Server & Database Engine documented in Hermes dossier.”

Supporting Verified Evidence:

ParameterTechnical SpecificationThreat Context
CVE IdentifierCVE-2026-85788Frontier AI / MCP Threat Landscape
Target Productawslabs mysql-mcp-serverAmazon Web Services / MCP Community
Subsystem / Componentawslabs.mysql_mcp_server.query_guard (SQL Mutation Detector)Autonomous agent tool & orchestration stack
Flaw TypeCWE-89: SQL Injection / CWE-184: Incomplete BlacklistExecution and integrity violation
Affected Versionsall versions prior to 0.3.5Production deployments
Remediation Release0.3.5Immediate upgrade required

The detector checked queries using string matching:

BLOCKED_KEYWORDS = ["UPDATE", "DELETE", "DROP", "ALTER", "INSERT", "TRUNCATE"]
for word in BLOCKED_KEYWORDS:
if re.search(r"\b" + word + r"\b", query, re.IGNORECASE):
raise SecurityException("Mutating SQL statements are forbidden.")

MySQL interprets comments prefixed with an exclamation point and version number (/*!50000 ... */) as active executable SQL code. Because re.search failed to strip MySQL versioned comments, queries like: SELECT 1; /*!50000 UPDATE users SET role='admin' WHERE id=1 */ bypassed detection when word boundaries were broken or when hexadecimal literals were used.

+----------------------------------------------------------------------------------------------------+
| CVE-2026-85788 ATTACK LIFECYCLE FLOW |
+----------------------------------------------------------------------------------------------------+
[Adversary / Prompt Injection]
โ”‚
โ”‚ [1] Dispatches payload targeting tool interface or orchestration hook
โ–ผ
[awslabs mysql-mcp-server]
โ”‚
โ”œโ”€โ”€โ”€โ–บ 1. Ingestion via awslabs.mysql_mcp_server.query_guard (SQL Mutation Detector)
โ”‚ - Inadequate sanitization or permission callback failure
โ”‚
โ”œโ”€โ”€โ”€โ–บ 2. Execution / State Mutation
โ”‚ - Escapes sandbox / bypasses read-only guard / executes OS command
โ”‚
โ–ผ
[Impacted Target Infrastructure]
โ”‚
โ””โ”€โ”€โ”€โ–บ Unauthorized data exfiltration, system takeover, or persistent code execution
+----------------------------------------------------------------------------------------------------+

{
"jsonrpc": "2.0",
"id": 10,
"method": "tools/call",
"params": {
"name": "run_query",
"arguments": {
"sql": "SELECT 1; /*!50000 UPDATE accounts SET balance = balance + 100000 WHERE id = 42 */"
}
}
}

title: MySQL MCP Versioned Comment Mutation Bypass
id: 85788c01-e788-4a1b-8f22-mysqlmcp01
status: high
description: Detects MySQL versioned comment injection syntax in queries handled by mysql-mcp-server.
author: Hermes Codex Detection Engineering
date: 2026-09-07
logsource:
product: mysql
service: general_query_log
detection:
selection:
argument|contains:
- '/*!'
- 'UPDATE'
- 'DELETE'
- 'DROP'
condition: selection
level: high

  1. Apply Software Patches: Upgrade awslabs mysql-mcp-server to version(s) 0.3.5 immediately.
  2. Review Autonomous Tool Permissions: Audit MCP tool declarations and ensure strict input validation and sandboxed environments.
  3. Audit Execution Logs: Inspect historical application and audit logs for anomalies, unexpected child processes, or unauthorized network calls.
  4. Enforce Principle of Least Privilege: Ensure underlying service accounts possess minimal permissions on cloud resources and database instances.