Skip to content

CVE-2026-46850: Remote Code Execution via Code Injection in MySQL Shell for VS Code

HERMES

HERMES THREAT SCORE & OPERATIONAL EXPOSURE

Target: MySQL Shell (Shell for VS Code) — Oracle MySQL Enterprise & Community Ecosystem
Confidence: 95%
94 / 100
CRITICAL

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

Dimension Breakdown
Exploitability 19 / 20
Threat Activity 17 / 20
Weaponization 18 / 20
Exposure 18 / 20
Prevalence 19 / 20
Impact 20 / 20
Exploit Maturity 16 / 20
Attack Chain Potential 19 / 20
⚖️ Divergence & Operational Rationale

While CVSS rates CVE-2026-46850 at 9.9, Hermes scores this flaw at 94 (CRITICAL). The combination of network accessibility over HTTP RPC bridges, low required privileges, and Scope Change (S:C) allows unprivileged database operators to execute arbitrary commands on developer workstations, pillaging cloud credentials, source code, and deployment pipeline secrets.

HASS

HASS INFRASTRUCTURE & AGENTIC IMPACT POSTURE

Target: Developer Workstations, IDE Workspaces & Automated CI/CD Agents
Confidence: 92%
88 / 100
CRITICAL

Measures specific systemic risk arising from autonomy, tool authority, and cascading execution.

Dimension Breakdown
Autonomy 14 / 20
Tool Access 18 / 20
Privilege 17 / 15
Persistence 14 / 15
External Impact 16 / 15
Propagation 17 / 15
⚖️ Divergence & Operational Rationale

Modern automated database deployment pipelines, agentic query tooling, and Kubernetes operators rely on reliable boundaries. Compromising MySQL Shell (Shell for VS Code) allows adversaries to pierce compartmentalization boundaries and expand footholds across adjacent infrastructure.

🕸️ Connected Knowledge Graph & Provenance

CVE-2026-46850: Remote Code Execution via Code Injection in MySQL Shell for VS CodeVULNERABILITY

Connected Nodes: 1
Active Relationships (Outgoing)
→ affectsPRODUCTOracle MySQL Shell & VS Code Extension
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 Shell & VS Code Extension documented in Hermes dossier.”

Supporting Verified Evidence:

1. Technical Context & Affected Software Matrix

Section titled “1. Technical Context & Affected Software Matrix”

MySQL Shell (Shell for VS Code) plays a central role within the Oracle MySQL ecosystem. Flaws in this layer expose both database assets and interconnecting applications.

ParameterTechnical SpecificationOperational Context
CVE IdentifierCVE-2026-46850Oracle CPU Record / NVD Reference
Component NameMySQL Shell (Shell for VS Code)Oracle MySQL Ecosystem
Vulnerability ClassCode Injection & Workstation EscapingCWE-94 (Improper Control of Generation of Code (‘Code Injection’))
Network VectorTCP 4300-4350 (Internal Shell RPC) / HTTPLow Privileged Network Access
Scope ImpactScope Change (S:C) — Host/Cluster EscapingImpact across trust boundaries
Affected VersionsMySQL Shell 2026.2.0+9.6.1 and prior releasesPrior releases lacking patch validation
Fixed Releases2026.2.1+9.6.2Available in official Oracle distribution

2. Root Cause Analysis & Architectural Flaw

Section titled “2. Root Cause Analysis & Architectural Flaw”

Flaw Mechanism in MySQL Shell (Shell for VS Code)

Section titled “Flaw Mechanism in MySQL Shell (Shell for VS Code)”

The vulnerability originates from insufficient input sanitization, improper access control, or incorrect privilege delegation within MySQL Shell (Shell for VS Code).

+-------------------------------------------------------------------------+
| ATTACK INGRESS |
| Attacker / Rogue Client ==[ AV:N ]==> MySQL Shell (Shell for VS Code) |
+-------------------------------------------------------------------------+
|
v
+-------------------------------------------------------------------------+
| VULNERABILITY EXECUTION BOUNDARY |
| - Parsing & Verification Defect: CWE-94 (Improper Control of Generation of Code ('Code Injection')) |
| - Security Boundary Failure: Breaks out into Host OS / Kubernetes |
+-------------------------------------------------------------------------+
|
v
+-------------------------------------------------------------------------+
| IMPACTED ASSETS |
| - Confidentiality: Full Host / DB Read |
| - Integrity: Arbitrary State Manipulation |
| - Availability: Full Denial of Service / Crash |
+-------------------------------------------------------------------------+

When receiving requests over TCP 4300-4350 (Internal Shell RPC) / HTTP, the component fails to enforce strict boundary restrictions. An attacker capitalizing on this logic gap can manipulate execution state, invoke privileged RPC endpoints, or crash daemon routines.


sequenceDiagram
autonumber
actor Attacker as Attacker / Compromised Client
participant Target as MySQL Shell (Shell for VS Code)
participant Backend as Core Database / Host Runtime
Attacker->>Target: Transmit crafted payload over TCP 4300-4350 (Internal Shell RPC) / HTTP
Note over Target: Trigger logic bug: CWE-94
Target->>Backend: Execute unauthorized action / Unvalidated RPC
Note over Backend: Scope Change triggered: Host breakout
Backend-->>Attacker: Administrative access / Intercepted credentials / Denial of Service

4. Forensic Triage & Detection Engineering

Section titled “4. Forensic Triage & Detection Engineering”
title: Suspicious Activity Related to CVE-2026-46850 in MySQL Shell (Shell for VS Code)
id: cve-2026-46850-detection-sigma
status: experimental
description: Detects suspicious process lineage or abnormal command execution related to CVE-2026-46850.
references:
- https://www.oracle.com/security-alerts/
author: Hermes Codex Cyber Intelligence
date: 2026-09-15
tags:
- attack.initial_access
- attack.execution
- attack.t1190
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentImage|endswith:
- 'code'
selection_child:
Image|endswith:
- '/bin/bash'
condition: selection_parent and selection_child
level: high

5. Mitigation & Defense-in-Depth Remediation Steps

Section titled “5. Mitigation & Defense-in-Depth Remediation Steps”
  1. Apply Official Oracle Vendor Patches: Upgrade MySQL Shell (Shell for VS Code) to release 2026.2.1+9.6.2 or later immediately following the Oracle Critical Patch Update guidance.

  2. Enforce Network Segmentation & Access Control: Restrict access to port TCP 4300-4350 (Internal Shell RPC) / HTTP. Under no circumstances should management, routing, or internal shell RPC endpoints be exposed to the public Internet or untrusted subnets.

  3. Audit Privileges and Role Assignments: Review database user grants (SUPER, REPLICATION SLAVE, BACKUP_ADMIN). Ensure the principle of least privilege is rigorously applied across application and operator service accounts.

  4. Rotate Infrastructure Credentials: If compromise or unauthorized access is suspected, immediately rotate database administrative passwords, TLS certificates, and Kubernetes service account tokens.