CHAINLIT · CVE-2026-22218 · AI agents & MCP
FIX → 2.9.4
Chainlit, a Python framework for building chat apps with AI models, lets a logged-in user send a custom element pointing at an arbitrary path on the server. The attacker can then download that file through the element key, exposing any file the Chainlit service can read.
first public Jan 20, 2026 · 2 sources
Check it with your coding agent
It reads this page and tells you if your code or app is affected.
Applications built on Chainlit versions before 2.9.4 that require user login are exposed, because the attacker must hold an authenticated session before sending the crafted element update. Any service the Chainlit process can read, including configuration, secrets and source files, is at risk. Deployments on 2.9.4 or later are not affected.
Not affected if chainlit-2.9.4-or-later, no-authentication-exposed
Who cares chainlit, python, self-hosted
pip show chainlit and confirm the installed version is below 2.9.4.chainlit pinned under 2.9.4.Upgrade to 2.9.4
Chainlit versions prior to 2.9.4 contain an arbitrary file read vulnerability in the /project/element update flow. An authenticated client can send a custom Element with a user-controlled path value, causing the server to copy the referenced file into the attacker’s session. The resulting element identifier (chainlitKey) can then be used to retrieve the file contents via /project/file/<chainlitKey>, allowing disclosure of any file readable by the Chainlit service.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
InfraStack checks it against your stack and answers on your report, with the evidence and the fix.
2.9.4.GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.