LiveActive security incident?Get immediate response
CVE Record

CVE-2026-45018: Chainlit: Command injection via MCP stdio transport allows unauthenticated remote code execution

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.

CriticalCVSS 9.8Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

Affected Chainlit applications can let anyone who reaches the MCP endpoint run operating-system commands without logging in. Successful exploitation would give the attacker the Chainlit process’s privileges, potentially exposing data, altering systems, or interrupting service. Exposure requires an affected version with MCP enabled and the stdio transport path available.

Executive priority

Prioritize immediate remediation for exposed production deployments because compromise requires no credentials or user action and can affect the entire host context available to Chainlit. Upgrade urgently, restrict endpoint access during rollout, and verify configuration across every environment. Lower urgency only after confirming MCP is disabled or the affected endpoint is unreachable.

Technical view

Chainlit versions 2.4.0rc0 through 2.11.x expose an unauthenticated POST /mcp endpoint when features.mcp.enabled is true. For stdio transport, validation checks only the executable name while forwarding attacker-controlled arguments. Permitted tools such as npx can interpret those arguments as shell commands. An unset allowed_executables value permits every executable. Version 2.12.0 fixes the issue.

Likely exposure

Internet-accessible or otherwise untrusted-accessible Chainlit deployments are most exposed when running versions >=2.4.0rc0 and <2.12.0 with MCP enabled. Risk is especially direct where stdio transport is usable, npx is allowed, or allowed_executables is unset. Deployments without MCP enabled are not described as affected by this path.

Exploitation context

The CVSS 3.1 score is 9.8: network-accessible, low complexity, unauthenticated, and requiring no user interaction, with high confidentiality, integrity, and availability impact. The supplied record does not identify known active exploitation, and the CVE is not listed as KEV in the bundle. Treat exploit activity as unconfirmed.

Researcher notes

This is CWE-78 command injection caused by incomplete validation across the MCP request and process-launch boundary. Executable-name allowlisting does not safely constrain interpreter-like arguments. The None default broadens exposure by allowing all executables. Assess process identity, accessible secrets, filesystem permissions, and connected services to estimate blast radius. No active exploitation evidence is supplied.

Mitigation direction

  • Upgrade Chainlit to version 2.12.0 or later.
  • Disable features.mcp.enabled until the upgrade is complete if MCP is unnecessary.
  • Restrict untrusted network access to POST /mcp while remediation is pending.
  • Review vendor guidance before relying on executable allowlisting as a compensating control.

Validation and detection

  • Inventory Chainlit versions and identify deployments below 2.12.0.
  • Inspect .chainlit/config.toml for features.mcp.enabled set to true.
  • Determine whether POST /mcp is reachable from untrusted networks without authentication.
  • Review stdio configuration for npx or an unset allowed_executables value.
  • After upgrading, confirm the deployed runtime reports version 2.12.0 or later.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-78: Command execution behavior lookup

Command injection weaknesses can lead defenders to review execution techniques and command interpreter telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-45018 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
9.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
1ADP providers
5Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: yesTechnical Impact: total

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.8CVSS 3.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H3.95.9GitHub_M

Vulnerability scoring details

Base CVSS 3.1 score

9.8Critical
CVSS 3.1 vector shape for CVE-2026-45018Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
Chainlitchainlit>= 2.4.0rc0, < 2.12.0Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-78 · source CWE mapping

Improper Neutralization of Special Elements used in an OS Command

Improper Neutralization of Special Elements used in an OS Command represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.