CVE-2026-22218: chainlit Chainlit Allows Authenticated Arbitrary File Vulnerability

HIGH
Advisory Identifier: GHSA-gm79-2pvc-wc75
CVSS 6.5
CWE-73 CWE-22
Published
Advisory Summary

CVE-2026-22218 is a HIGH (CVSS 6.5) chainlit allows authenticated arbitrary file vulnerability (CWE-73: External Control of File Name or Path) affecting chainlit libraries in the PyPI ecosystem. The issue involves chainlit allows authenticated arbitrary file reads through custom element updates. Remediation is available by upgrading affected packages to version 2.9.4.

CVE-2026-22218 at a Glance

CVE Identifier CVE-2026-22218
GHSA Identifier GHSA-gm79-2pvc-wc75
Severity HIGH
CVSS v3.1 Base Score 6.5
CWE Classification CWE-73: External Control of File Name or Path
Affected Product chainlit
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-22218

To remediate this vulnerability, upgrade all affected chainlit dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

chainlit fixed: 2.9.4
pip install chainlit>=2.9.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show chainlit

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-22218, inspect your installed packages using pip:

pip show chainlit

Analyze the terminal output to locate any version of chainlit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.4), your application is affected.

Note: The pip show chainlit command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-73: External Control of File Name or Path, where the product allows user input to control or influence paths or file names that are used in filesystem operations. In chainlit, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2026-22218 Affected chainlit Versions

1 component(s)
Fixed Versions:
2.9.4
Product / Package Ecosystem Affected Versions Fixed Version
chainlit
PyPI
< 2.9.4
2.9.4

References

Frequently Asked Questions

What is CVE-2026-22218?
CVE-2026-22218 is a security vulnerability in chainlit involving Chainlit allows authenticated arbitrary file reads through custom element updates under CWE-73: External Control of File Name or Path.
Which chainlit versions are affected?
Affected versions include releases prior to 2.9.4 across affected packages: chainlit.
What version fixes CVE-2026-22218?
Upgrading to 2.9.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is chainlit affected?
Yes, chainlit is affected in releases prior to 2.9.4. Upgrade your dependency to 2.9.4 or later.
What is the CVSS score of CVE-2026-22218?
CVE-2026-22218 has a CVSS v3.1 base score of 6.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-22218?
CVE-2026-22218 is classified under CWE-73: External Control of File Name or Path (The product allows user input to control or influence paths or file names that are used in filesystem operations.).
How can I check PyPI dependencies for CVE-2026-22218?
Run the dependency tree command: 'pip show chainlit'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gm79-2pvc-wc75",
  "modified" : "2026-11-16T22:36:32Z",
  "published" : "2026-01-20T00:30:28Z",
  "aliases" : [ "CVE-2026-22218" ],
  "summary" : "chainlit : Chainlit allows authenticated arbitrary file reads through custom element updates",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "chainlit"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.9.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-22218"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Chainlit/chainlit/pull/2737"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Chainlit/chainlit/commit/ffc3cce648b343b933e10e85ee5805c7e02ab3bf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Chainlit/chainlit"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Chainlit/chainlit/releases/tag/2.9.4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-gm79-2pvc-wc75"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/chainlit-arbitrary-file-read-via-project-element"
  }, {
    "type" : "WEB",
    "url" : "https://www.zafran.io/resources/chainleak-critical-ai-framework-vulnerabilities-expose-data-enable-cloud-takeover"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-73" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-16T22:36:32Z",
    "nvd_published_at" : "2026-01-20T00:15:48Z"
  }
}