Skip to main content

Chainlit CVE-2026-45018

| EUVDEUVD-2026-65737 CRITICAL
OS Command Injection (CWE-78)
2026-08-25 GitHub_M GHSA-w3fx-mc44-mf6j
9.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Reach exposed Chainlit /mcp endpoint
  2. Delivery
    Open unauthenticated Socket.IO session for sessionId
  3. Exploit
    POST stdio fullCommand 'npx -y -c payload'
  4. Execution
    Bypass executable-only allowlist check
  5. Persist
    Spawn subprocess via StdioServerParameters
  6. Impact
    Execute 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
Patch available 0.7% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – 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

Chainlit 2.4.0rc0, < 2.12.0

Affected Packages

pypi chainlit fix: 2.12.0
euvd chainlit_2_4_0rc0 fix: 2.12.0

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

Vendor (GitHub_M) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 9.8 CRITICAL

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.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Aug 25, 2026 - 21:04 EUVD
CVE Published
Aug 25, 2026 - 19:18 cve.org
CRITICAL 9.8

DescriptionCVE.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.

Executive ViewAI

Why It Matters

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.

Business Impact: Severe
Compensating Controls

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

EPSS Score
0.7%
Top 51% exploitable
Prevalence
Medium
popular open-source Python framework for building conversational AI apps
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

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 CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.7%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
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
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

70
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +49
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