CVE-2026-22218: Chainlit < 2.9.4 Arbitrary File Read via /project/element
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Chainlitto a version that resolves this vulnerability.Fixed in 2.9.4 - Compensating control
Restrict access to the Chainlit endpoints /project/element and /project/file/<chainlitKey> so only trusted users/sessions can reach them (reduce exposure of the arbitrary file read flow).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-22218?
CVE-2026-22218 has a high severity level due to its potential for arbitrary file reading by authenticated users.
How do I fix CVE-2026-22218?
To fix CVE-2026-22218, upgrade Chainlit to version 2.9.4 or later.
Who is affected by CVE-2026-22218?
All users of Chainlit versions prior to 2.9.4 are susceptible to CVE-2026-22218.
What is the nature of the vulnerability CVE-2026-22218?
CVE-2026-22218 is an arbitrary file read vulnerability allowing unauthorized access to file contents via manipulated element paths.
How can an attacker exploit CVE-2026-22218?
An attacker can exploit CVE-2026-22218 by sending a custom Element with a user-controlled path value during the update flow.