{"answers":{"affected":"3 open source packages ship an affected version, including chainlit.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45018 exists.","fix":"Upgrade chainlit to 2.12.0 or later.","what":"CVE-2026-45018 is a critical command injection vulnerability in chainlit, published on 25 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-45018 and fix it if it is affected.\n\nWhat it is: CVE-2026-45018 is a critical command injection vulnerability in chainlit, published on 25 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45018 exists.\n\nAffected packages and fixed versions:\n- chainlit (PyPI): affected from 2.4.0rc0; fixed in 2.12.0\n- chainlit (PyPI): affected from 2.4.0rc0; fixed in 2.12.0\n- chainlit (PyPI): affected from 2.4.0rc0; fixed in 2.12.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-45018/ (Markdown: https://insights.sbomify.com/CVE-2026-45018/index.md)","id":"CVE-2026-45018","markdown":"https://insights.sbomify.com/CVE-2026-45018/index.md","name":"CVE-2026-45018","record":{"aliases":["GHSA-w3fx-mc44-mf6j","PYSEC-2026-3812"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Chainlit AI framework","requires_auth":"none","summary":"Unauthenticated attackers can execute arbitrary shell commands via the MCP stdio endpoint if MCP features are enabled, leading to remote code execution.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":9.8,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Chainlit: Command injection via MCP stdio transport allows unauthenticated remote code execution","id":"CVE-2026-45018","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"command_injection","year":"2026"},"n_packages":3,"n_references":4,"next":{"headline":"Chainlit: SSRF via MCP SSE and streamable-http transports allows unauthenticated internal network access","id":"CVE-2026-45019"},"packages":[{"ecosystem":"PyPI","fixed":["2.12.0"],"introduced":["2.4.0rc0"],"last_affected":[],"package":"chainlit","purl":null,"source":"GHSA-w3fx-mc44-mf6j"},{"ecosystem":"PyPI","fixed":["2.12.0"],"introduced":["2.4.0rc0"],"last_affected":[],"package":"chainlit","purl":"pkg:pypi/chainlit","source":"GHSA-w3fx-mc44-mf6j"},{"ecosystem":"PyPI","fixed":["2.12.0"],"introduced":["2.4.0rc0"],"last_affected":[],"package":"chainlit","purl":"pkg:pypi/chainlit","source":"PYSEC-2026-3812"}],"prev":{"headline":"Python Liquid: Absolute paths escape filesystem loader search path","id":"CVE-2026-45017"},"products":["chainlit"],"published":"2026-08-25","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-08-25","vendors":["Chainlit"]},"summary":"Unauthenticated attackers can execute arbitrary shell commands via the MCP stdio endpoint if MCP features are enabled, leading to remote code execution.","url":"https://insights.sbomify.com/CVE-2026-45018/"}