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.
Security readout for executives and security teams
Plain-English summary
CVE-2026-22218 lets an authenticated Chainlit user make the server read and expose files that the Chainlit service account can access. This can disclose secrets, configuration, tokens, or application data from vulnerable deployments before 2.9.4.
Executive priority
Treat this as a high-priority patch for internet-facing or multi-user Chainlit systems. The main business risk is quiet disclosure of credentials or sensitive application files, not service outage.
Technical view
The issue is an arbitrary file read in Chainlit’s /project/element update flow. A client-controlled Element path can cause the server to copy a local file into the user session, after which the generated chainlitKey can retrieve contents via /project/file/<chainlitKey>.
Likely exposure
Exposure is likely where Chainlit versions before 2.9.4 are reachable by authenticated users, including shared AI app environments. Impact depends on what local files the Chainlit service account can read.
Exploitation context
The bundle says KEV is false. Public references include a technical description and exploit-tagged advisory, but the provided evidence does not establish active exploitation in the wild.
Researcher notes
Mapped to CWE-22 with CVSS 4.0 score 7.1. The vector indicates network access, low complexity, low privileges required, no user interaction, and high vulnerable-system confidentiality impact.
Mitigation direction
Upgrade Chainlit to version 2.9.4 or later.
Review Chainlit 2.9.4 release notes and vendor guidance.
Restrict Chainlit access to trusted authenticated users.
Run Chainlit with least-privilege filesystem permissions.
Rotate secrets if sensitive local files may have been exposed.
Validation and detection
Inventory deployed Chainlit versions and confirm none are below 2.9.4.
Review logs for unusual /project/element and /project/file access.
Identify sensitive files readable by the Chainlit service account.
Check whether exposed deployments allow broad authenticated user access.
Confirm post-upgrade behavior aligns with vendor guidance.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-22: File access and web shell behavior lookup
File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.