Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach exposed Chainlit /mcp endpoint
-
DeliveryOpen unauthenticated Socket.IO session for sessionId
-
ExploitPOST stdio fullCommand 'npx -y -c payload'
-
ExecutionBypass executable-only allowlist check
-
PersistSpawn subprocess via StdioServerParameters
-
ImpactExecute arbitrary shell as Chainlit process
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 | Requires features.mcp.enabled = true in .chainlit/config.toml - this is NOT the default (MCP has been disabled by default since v2.7.0), so vulnerable instances are those where an operator explicitly turned MCP on. The stdio transport must be usable and the allowlist must permit an executable that can run arbitrary commands (e.g. npx via its -c flag, or uvx); note that if allowed_executables is left unset it defaults to None and permits every executable. No authentication or user interaction is needed once MCP is enabled: the /mcp route is registered unconditionally and reachable by any client that can open a session (CVSS PR:N/UI:N). Limiting factors that reduce realistic exposure: the non-default enablement requirement, and any deployment that has placed /mcp behind an auth layer or network restrictions. |
| Impact | This is a genuine top-priority issue for any deployment that meets the trigger condition, not merely a high-CVSS paper risk. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/C:H/I:H/A:H, 9.8) aligns with the advisory: the /mcp endpoint requires no authentication (any client that can open a session reaches it) and the payload path is low-complexity, so an operator running an exposed instance should treat host compromise as the realistic outcome and patch urgently. The strongest mitigating factor is that exploitation requires a non-default configuration - features.mcp.enabled = true - and MCP has shipped disabled by default since v2.7.0, so the base score overstates risk for the majority of deployments that never enabled MCP. Working proof-of-concept exploits exist (developed by the SPL Security reporters and partially published in the GHSA advisory), which raises practical exploitability, but the CVE is not in CISA KEV and no EPSS score was provided in the input, so there is no confirmed evidence of active in-the-wild exploitation yet. Net: for the subset of Chainlit hosts with MCP explicitly enabled, this is an urgent, patch-now RCE; for the default-configured majority, real-world risk is low pending a config change. |
| Exploit ScenarioDerived | An attacker locates an internet-reachable Chainlit app that has features.mcp.enabled = true, opens an unauthenticated Socket.IO session to obtain a valid sessionId, and sends a POST /mcp request selecting stdio transport with fullCommand set to 'npx -y -c "<attacker shell payload>"'. The allowlist passes because the executable is npx, and the arguments run the payload as the Chainlit process, giving full host command execution. A working proof-of-concept was demonstrated against Chainlit 2.11.0 with default MCP settings. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 25, 2026
Unauthenticated remote code execution in Chainlit (2.4.0rc0 through 2.11.x) occurs when features.mcp.enabled is set to true, exposing the POST /mcp endpoint that accepts a user-controlled stdio command string. Because the allowlist only validates the executable name and passes arguments unchecked, an attacker can supply 'npx -y -c <payload>' to run arbitrary shell commands as the Chainlit process. Publicly available exploit code exists (working PoC from the reporting researchers and in the advisory); it is not listed in CISA KEV, and MCP has been disabled by default since v2.7.0, limiting the exposed population.
RemediationAI
Vendor-released patch: 2.12.0 (2026-08-25) - upgrade to 2.12.0, but note this is a breaking change: legacy MCP config keys ([features.mcp.stdio], allowed_executables, [features.mcp.sse], [features.mcp.streamable-http]) now abort startup, client-supplied fullCommand is rejected, stdio servers must be declared server-side under [[features.mcp.servers]] with type = "stdio", and @chainlit/react-client 0.5.0 changes the connection API, so follow the MCP config and react-client migration guides in the changelog before upgrading. If you cannot upgrade immediately, the fully effective compensating control is to set features.mcp.enabled = false (the default), which prevents exploitation of both this command injection and the related SSRF (CVE-2026-45019) at the cost of losing MCP functionality. If MCP must stay enabled pre-upgrade, put the /mcp endpoint behind authentication and network restrictions, explicitly define a minimal allowed_executables list (never leave it unset, since None allows all), and avoid allowing launchers like npx/uvx that expose arbitrary-command flags - though none of these fully close the argument-injection gap, which is why upgrading or disabling MCP is the real fix. See https://github.com/Chainlit/chainlit/blob/2.12.0/docs/security-advisory-2026-mcp.md#spl-2026-001--command-injection-via-mcp-stdio and commit 0565fd0eccb915fce159929598b053ed79f6e0c9.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in pypi, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Chainlit is a Python framework for building conversational AI applications built on FastAPI and Socket.IO. The flaw is a classic CWE-78 OS command injection in the Model Context Protocol (MCP) integration: the /mcp route is registered unconditionally, and for the 'stdio' transport the validate_mcp_command() function in backend/chainlit/mcp.py uses shlex.split() to parse a client-supplied fullCommand, then validates only the leading executable against config.features.mcp.stdio.allowed_executables. The remaining arguments flow unfiltered into StdioServerParameters in backend/chainlit/server.py, which spawns a subprocess. Trusted launchers like npx (and uvx) themselves accept flags such as npx's -c that execute arbitrary shell strings, so an allowlisted executable becomes a command-execution primitive. Compounding this, the Pydantic model defaults allowed_executables to None, which the code treats as 'allow every executable.' The affected package is cpe:2.3:a:chainlit:chainlit.
Know when Chainlit 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
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
The /mcp endpoint is unauthenticated and network-reachable with a low-complexity payload yielding full host RCE; the non-default MCP-enabled requirement is not a CVSS 3.1 base metric, so it does not lower PR or AC.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Chainlit is a Python framework for building production-ready conversational AI applications. From 2.4.0rc0 until 2.12.0, Chainlit deployments with features.mcp.enabled set to true in .chainlit/config.toml expose the POST /mcp endpoint without requiring authentication. For stdio transport, the endpoint accepts a user-controlled fullCommand string. The validate_mcp_command() function in backend/chainlit/mcp.py checks only the executable name against config.features.mcp.stdio.allowed_executables and passes unchecked arguments to StdioServerParameters in backend/chainlit/server.py. Because npx supports the -c argument, an attacker can execute arbitrary shell commands with the privileges of the Chainlit process. If allowed_executables is unset, its None default is treated as allowing every executable. This issue is fixed in version 2.12.0.
Articles & Coverage 1
Executive ViewAI
Chainlit versions 2.4.0rc0 through 2.11.x contain a critical vulnerability enabling unauthenticated remote code execution when the Model Context Protocol feature is enabled. An attacker can execute arbitrary system commands without credentials, directly risking data compromise, system takeover, and operational disruption. Organizations running these versions with this feature enabled face immediate exploitation risk.
No vendor-released patch identified at time of analysis. Immediate mitigation: set features.mcp.enabled=false in configuration files for all affected instances. As an alternative, upgrade to Chainlit 2.7.0 or later where this feature is disabled by default. If the feature must remain enabled pending patch availability, restrict network access to the POST /mcp endpoint through firewall or API gateway controls. Monitor vendor advisories continuously for patch release.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Server-side request forgery in Chainlit before 2.9.4 lets an authenticated user coerce the server into fetching an attac
Arbitrary file read in Chainlit versions prior to 2.9.4 lets an authenticated user disclose any file readable by the Cha
Session hijacking in Chainlit before 2.10.1 allows remote attackers with a valid victim sessionId to inherit an authenti
Unauthenticated remote directory deletion in Chainlit through 2.12.0 allows any network-accessible attacker to recursive
Feedback endpoint authorization bypass in Chainlit through 2.12.0 allows authenticated users to modify or delete other u
EUVD-2026-65737
GHSA-w3fx-mc44-mf6j
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB