Skip to main content

Kimi Code EUVDEUVD-2026-84628

| CVE-2026-95660 LOW
OS Command Injection (CWE-78)
2026-09-22 VulDB GHSA-jp7p-97jq-v89h
2.1
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Publish malicious workspace with crafted .mcp.json
  2. Delivery
    Victim opens untrusted workspace in Kimi Code
  3. Exploit
    Config loader auto-spawns MCP server
  4. Execution
    Injected OS command executes as user
  5. Impact
    Attacker-controlled code runs in developer context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim to run Moonshot AI Kimi Code (≤0.31.0) inside an UNTRUSTED workspace that contains an attacker-controlled .mcp.json, which the MCP Configuration Loader auto-spawns before/without a trust confirmation, injecting OS commands. A secondary vector requires the untrusted workspace to plant a bare-name executable (e.g., fd or stty) resolvable via $PATH before confirmation. Limiting factors: the attacker cannot trigger this against a server - a developer must open/operate on the malicious workspace (UI:P/UI:R), the target must be a pre-0.31.1 version, and the fix (absolute-path resolution of fd/stty plus the trust prompt) neutralizes both the auto-spawn and path-planting paths.

Impact

The vendor (VulDB) rates this CVSS 4.0 at only 2.1, driven by low sub-scores across the board (VC:L/VI:L/VA:L) and UI:P, yet the underlying flaw is an OS command injection (CWE-78) in the MCP Configuration Loader - a class that normally yields full arbitrary code execution. This is a notable conflict: the CVSS impact metrics understate the technical severity of command injection, which realistically grants arbitrary code execution in the context of the user running Kimi Code. Balancing signals: a public exploit exists (POC=YES, SSVC/CVSS E:P 'Proof-of-Concept'), but there is NO CISA KEV listing and NO EPSS score in the provided data, so there is no evidence of active or widespread exploitation. Crucially, exploitation is gated: it requires a victim to run Kimi Code inside an untrusted workspace containing a malicious .mcp.json that auto-spawns processes (plus a secondary $PATH path-planting vector via bare-name fd/stty binaries). The 'attack may be launched remotely' framing reflects that the malicious repository is delivered remotely, but triggering still depends on the victim opening/operating on that untrusted workspace locally (UI is required). Net: this is a real, patched, publicly-exploitable weakness that matters for developers using AI coding agents on untrusted code, but it is not a mass-exploitation, unauthenticated-server priority - treat as a targeted supply-chain/workspace-trust risk. The vendor's 2.1 score materially understates the impact of a command-injection primitive; verify impact independently.

Exploit ScenarioDerived

An attacker publishes a repository (or tricks a developer into cloning one) containing a malicious .mcp.json; when the victim opens that untrusted workspace in Kimi Code ≤0.31.0, the MCP Configuration Loader auto-spawns the attacker-defined server, executing injected OS commands as the developer. A secondary variant plants a bare-name executable (e.g., a fake fd or stty) in the workspace so it is resolved via $PATH before the trust confirmation. A public proof-of-concept exists (linked from VulDB), so exploitation requires little attacker development effort.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 1.7% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 22, 2026

OS command injection in Moonshot AI's Kimi Code (versions 0.31.0 and earlier) lets an attacker-controlled .mcp.json file in an untrusted workspace be auto-spawned by the MCP Configuration Loader before any trust confirmation, executing arbitrary OS commands on the developer's machine. Exploitation requires the victim to open or operate on the malicious workspace (user interaction) and to run a pre-0.31.1 version; publicly available exploit code exists, but there is no confirmed active exploitation (no CISA KEV). Although the vendor rates this CVSS 4.0 at only 2.1, an independent assessment scores it 7.8 (CVSS 3.1, AV:L/AC:L/PR:N/UI:R, C:H/I:H/A:H) because CWE-78 command injection inside an AI agent's configuration loader normally yields full code execution.

RemediationAI

Vendor-released patch: 0.31.1 (upgrade to @moonshot-ai/kimi-code 0.31.1), which enforces the trust prompt before MCP auto-spawn and resolves fd/stty to absolute paths so untrusted workspaces cannot plant bare-name executables on $PATH. Until patching is possible, treat every .mcp.json from an untrusted workspace as executable code: avoid opening untrusted repositories or workspaces with Kimi Code, inspect and remove .mcp.json from cloned projects before launching the agent, and run the agent in an isolated container or low-privilege account with a hardened $PATH so injected commands cannot reach sensitive resources; these workarounds reduce exposure but do not fully neutralize the auto-spawn behavior, so they should be temporary. Because publicly available exploit code exists, prioritize patching over workarounds. Advisory references: https://vuldb.com/vuln/408415 (and its CTI page https://vuldb.com/vuln/408415/cti), plus the patch release https://github.com/MoonshotAI/kimi-code/releases/tag/%40moonshot-ai%2Fkimi-code%400.31.1.

Affected VersionsENISA

Kimi Code 0.25
Kimi Code 0.16
Kimi Code 0.30
Kimi Code 0.21
Kimi Code 0.8
Kimi Code 0.11
Kimi Code 0.15
Kimi Code 0.24
Kimi Code 0.26
Kimi Code 0.7
Kimi Code 0.3
Kimi Code 0.28
Kimi Code 0.31.0
Kimi Code 0.5
Kimi Code 0.14
Kimi Code 0.18
Kimi Code 0.19
Kimi Code 0.13
Kimi Code 0.1
Kimi Code 0.9
Kimi Code 0.6
Kimi Code 0.12
Kimi Code 0.22
Kimi Code 0.17
Kimi Code 0.20
Kimi Code 0.23
Kimi Code 0.10
Kimi Code 0.4
Kimi Code 0.27
Kimi Code 0.29
Kimi Code 0.2

Affected Packages

euvd kimi_code no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Kimi Code is an AI coding agent/CLI from Moonshot AI that uses the Model Context Protocol (MCP) to load tool-server definitions from a workspace-local .mcp.json file. The vulnerable logic in agent-core-v2/src/agent/mcp/config-loader.ts (component: MCP Configuration Loader) fails to neutralize special elements in MCP configuration values and, in versions up to 0.31.0, resolves helper binaries such as fd and stty by bare name via $PATH while auto-spawning MCP servers before the user trust prompt. This maps to CWE-78 (improper neutralization of special elements used in an OS command) and yields two injection paths: the primary one where a malicious .mcp.json is auto-spawned prior to trust confirmation, injecting OS commands, and a secondary one where an attacker plants bare-name executables (e.g., fd, stty) earlier in $PATH so they are resolved instead of the intended system binaries. The CPE cpe:2.3:a:moonshot_ai:kimi_code:*:*:*:*:*:*:*:* captures the affected product line; the fix in 0.31.1 resolves fd/stty to absolute paths and enforces the trust prompt before auto-spawn. Note that the vendor description labels the attack as remotely launchable, but the independently assessed CVSS 3.1 vector is AV:L/UI:R, meaning an attacker cannot directly trigger it against a server; a developer must open the poisoned workspace.

Know when Kimi Code gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulDB) PRIMARY 2.1 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
vuln.today AI 7.8 HIGH

OS command injection yields arbitrary code execution as the user (C/I/A:H); AV:L and UI:R because the victim must open a malicious local workspace, and no prior auth is needed (PR:N).

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Severity Changed
Sep 22, 2026 - 18:22 NVD
MEDIUM LOW
CVSS changed
Sep 22, 2026 - 18:22 NVD
5.3 (MEDIUM) 2.1 (LOW)
CVE Published
Sep 22, 2026 - 18:00 cve.org
LOW 2.1

DescriptionCVE.org

A security flaw has been discovered in Moonshot AI Kimi Code up to 0.31.0. The affected element is an unknown function of the file agent-core-v2/src/agent/mcp/config-loader.ts of the component MCP Configuration Loader. The manipulation results in os command injection. The attack may be launched remotely. The exploit has been released to the public and may be used for attacks. Upgrading to version 0.31.1 is sufficient to fix this issue. It is recommended to upgrade the affected component. Beyond the trust prompt, the fix resolves fd/stty binaries to absolute paths specifically "so untrusted workspaces cannot plant bare-name executables before confirmation," fixing a secondary $PATH path-planting vector alongside the primary untrusted-.mcp.json auto-spawn.

Threat Intelligence Overview

EPSS Score
1.7%
Top 24% exploitable
Prevalence
Low
Niche, newer AI coding-agent CLI from Moonshot AI; limited developer-only footprint
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC Yes
EPSS 1.7%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: +2
CVSS: +10
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy