Security Digest · Vulnerability record
CVE-2026-45018: Chainlit has command injection via MCP stdio transport that allows unauthenticated remote code execution
Chainlit is a Python framework for building production-ready conversational AI applications.
CVSS 9.8 Critical EPSS 1.1% · p65
Should you act?
Critical and remotely reachable
No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 1.1%, percentile 65: FIRST’s model estimates a 1.1% chance of exploitation activity in the next 30 days, higher than 65% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes
chainlit(PyPI) >= 2.4.0rc0, <= 2.11.1, fixed in 2.12.0. Check your lockfile, including transitive dependencies.
What it is
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 validatemcpcommand() function in backend/chainlit/mcp.py checks only the executable name against config.features.mcp.stdio.allowedexecutables 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 allowedexecutables is unset, its None default is treated as allowing every executable. This issue is fixed in version 2.12.0.
From the GitHub advisory
Am I affected?
Only if your deployment sets features.mcp.enabled = true in .chainlit/config.toml. MCP has been disabled by default since v2.7.0, so most Chainlit deployments are not affected. No authentication is required: /mcp is reachable by any client that can open a session.
Summary
When MCP is enabled (features.mcp.enabled = true), the POST /mcp endpoint for stdio transport accepts a user-controlled fullCommand string. The validatemcpcommand() function checks the executable name against a configurable allowlist but does not inspect or restrict the arguments. An attacker can pass npx -y -c 'ARBITRARY COMMAND' to execute arbitrary shell commands on the server with the privileges of the Chainlit process.
Affected / patched versions
Weakness type: CWE-78.
Product: chainlit (PyPI) · Assigned by: GitHub_M · Published: 2026-08-25
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| PyPI | chainlit | >= 2.4.0rc0, <= 2.11.1 | 2.12.0 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| Chainlit | chainlit | >= 2.4.0rc0, < 2.12.0 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_M | 3.1 | 9.8 Critical | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Privileges required: none (no login)
- User interaction: none
- Scope: unchanged
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc, automatable yes, technical impact total.
- FIRST EPSS (model of 2026-10-21): 1.09% probability of exploitation activity in the next 30 days; percentile 65.
Timeline
- — CVE record last updated
- — CVE record published by GitHub_M
- — GitHub-reviewed advisory GHSA-w3fx-mc44-mf6j published (critical)
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vulnerability records
- GitHub Advisory GHSA-w3fx-mc44-mf6j github.com
- CVE.org record CVE-2026-45018 cve.org
- NVD entry CVE-2026-45018 nvd.nist.gov
Other references from the CVE record and advisory
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com