---
id: "CVE-2026-22218"
page: "https://infrastack.ai/live/CVE-2026-22218"
kind: "vulnerability"
aliases: ["CVE-2026-22218", "GHSA-gm79-2pvc-wc75"]
title: "chainlit : Chainlit allows authenticated arbitrary file reads through custom element updates"
severity: "high"
cvss: 7.1
epss: 0.09724
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "chainlit", "fixed": ["2.9.4"], "affected": "< 2.9.4", "ecosystem": "pypi"}, {"name": "chainlit", "fixed": ["2.9.4"], "affected": "< 2.9.4", "ecosystem": "vendor"}]
ecosystems: ["pypi", "vendor"]
tags: ["ai-tooling", "chainlit", "cwe-22", "cwe-73", "python", "self-hosted"]
not_affected_if: ["chainlit-2.9.4-or-later", "no-authentication-exposed"]
published_at: "2026-01-20T00:15:48+00:00"
first_seen_at: "2026-11-16T22:38:02+00:00"
updated_at: "2026-11-16T22:39:16+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-gm79-2pvc-wc75", "first_seen_at": "2026-11-16T22:38:02+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-22218", "first_seen_at": "2026-11-16T22:39:16+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.09724, "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-22218"}]
---

# chainlit : Chainlit allows authenticated arbitrary file reads through custom element updates

Link for people: https://infrastack.ai/live/CVE-2026-22218 (this .md is for agents)

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.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:chainlit affected < 2.9.4 fixed 2.9.4
- vendor:chainlit affected < 2.9.4 fixed 2.9.4

## How to check

- Run `pip show chainlit` and confirm the installed version is below `2.9.4`.
- Check the lockfile or requirements file for `chainlit` pinned under `2.9.4`.

## Fix

- Chainlit: upgrade to `2.9.4`.

## Timeline

- 2026-11-16T22:38:02+00:00 ghsa https://github.com/advisories/GHSA-gm79-2pvc-wc75
- 2026-11-16T22:39:16+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-22218

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/chainlit-arbitrary-file-read-via-project-element
- [fix] Release: github.com https://github.com/Chainlit/chainlit/releases/tag/2.9.4
- [fix] Patch: github.com https://github.com/Chainlit/chainlit/pull/2737
- [fix] Patch: github.com https://github.com/Chainlit/chainlit/commit/ffc3cce648b343b933e10e85ee5805c7e02ab3bf
- [mitigation] Vendor mitigation: www.zafran.io https://www.zafran.io/resources/chainleak-critical-ai-framework-vulnerabilities-expose-data-enable-cloud-takeover

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
