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

- Severity: Critical 9.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.80%, higher than 57% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-25T19:18:46.439Z
- Modified: 2026-09-10T12:26:01.565Z
- Also known as: GHSA-w3fx-mc44-mf6j, PYSEC-2026-3812
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- Chainlit chainlit: >= 2.4.0rc0, < 2.12.0
- chainlit (PyPI): from 2.4.0rc0 before 2.12.0

## Every score

- GitHub_M: CVSS: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: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/Chainlit/chainlit/security/advisories/GHSA-w3fx-mc44-mf6j> (exploit, web)
- <https://github.com/Chainlit/chainlit/commit/0565fd0eccb915fce159929598b053ed79f6e0c9> (web)
- <https://github.com/Chainlit/chainlit/blob/2.12.0/docs/security-advisory-2026-mcp.md#spl-2026-001--command-injection-via-mcp-stdio>
- <https://github.com/Chainlit/chainlit/releases/tag/2.12.0> (web)
- <https://github.com/Chainlit/chainlit> (package)
- <https://pypi.org/project/chainlit> (package)
- <https://github.com/advisories/GHSA-w3fx-mc44-mf6j> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-45018> (advisory)

## Sources

- CVE List: [CVE-2026-45018](https://www.cve.org/CVERecord?id=CVE-2026-45018), CVE Terms of Use, modified 2026-08-25
- GitHub Advisory Database: [GHSA-w3fx-mc44-mf6j](https://github.com/advisories/GHSA-w3fx-mc44-mf6j), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-45018](https://nvd.nist.gov/vuln/detail/CVE-2026-45018), Public domain, modified 2026-09-09
- PyPA Advisory Database: [PYSEC-2026-3812](https://osv.dev/vulnerability/PYSEC-2026-3812), CC-BY-4.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2026-45018 · Whole record: https://cve.day/CVE-2026-45018.json · Rebuilt by cve.day 2026-11-25T22:59:35.212Z
