CVE-2026-56104: Chainlit: session hijacking via WebSocket restoration
HIGHChainlit before 2.10.1 allows any unauthenticated attacker who obtains a valid sessionId to fully impersonate an authenticated user by exploiting the WebSocket restore_existing_session path, which performs no ownership verification. With 40 downstream dependents and CWE-862 (Missing Authorization) at its core, this is a straightforward authorization failure that grants the attacker the victim's full permissions and roles — including the ability to invoke AI agent tools and access data the victim was authorized to see. Although attack complexity is rated High (sessionId must be obtained via interception, log exposure, or recon), no privileges or user interaction are required, and there is no active exploitation or public exploit code to date. Teams running Chainlit-based AI frontends should upgrade to 2.10.1 immediately and audit server logs for anomalous WebSocket session restoration events.
What is the risk?
CVSS 7.4 High with network attack vector and no privileges required positions this as a meaningful risk for any externally or internally exposed Chainlit deployment. Attack complexity is the primary mitigation factor — sessionId theft requires a precondition — but this bar is easily cleared in environments with verbose logging, insecure WebSocket proxies, or shared infrastructure. For AI deployments specifically, the blast radius extends beyond typical web session hijacking: the attacker inherits authorization to invoke LLM agent tools, access conversation history containing potentially sensitive organizational data, and interact with backend integrations configured for the victim user. The package has had 2 prior CVEs, indicating a pattern of security debt in this component.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Chainlit | pip | — | No patch |
Do you use Chainlit? You're affected.
How severe is it?
What is the attack surface?
What should I do?
6 steps-
Patch immediately: upgrade chainlit to >= 2.10.1 (commit 5effb664).
-
Audit WebSocket access logs for restore_existing_session calls that do not correlate with the originating authenticated session's IP or user-agent.
-
If immediate patching is blocked, restrict Chainlit to VPN-only or add a reverse proxy layer enforcing additional session binding (IP pinning, token rotation).
-
Rotate all active sessionIds post-patch to invalidate any potentially hijacked sessions.
-
Review tool configurations attached to Chainlit sessions and apply least-privilege: disable tool invocations that are not strictly necessary for each user role.
-
Monitor for lateral movement indicators: unexpected tool invocations or data access patterns from sessions that recently used restore_existing_session.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-56104?
Chainlit before 2.10.1 allows any unauthenticated attacker who obtains a valid sessionId to fully impersonate an authenticated user by exploiting the WebSocket restore_existing_session path, which performs no ownership verification. With 40 downstream dependents and CWE-862 (Missing Authorization) at its core, this is a straightforward authorization failure that grants the attacker the victim's full permissions and roles — including the ability to invoke AI agent tools and access data the victim was authorized to see. Although attack complexity is rated High (sessionId must be obtained via interception, log exposure, or recon), no privileges or user interaction are required, and there is no active exploitation or public exploit code to date. Teams running Chainlit-based AI frontends should upgrade to 2.10.1 immediately and audit server logs for anomalous WebSocket session restoration events.
Is CVE-2026-56104 actively exploited?
No confirmed active exploitation of CVE-2026-56104 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-56104?
1. Patch immediately: upgrade chainlit to >= 2.10.1 (commit 5effb664). 2. Audit WebSocket access logs for restore_existing_session calls that do not correlate with the originating authenticated session's IP or user-agent. 3. If immediate patching is blocked, restrict Chainlit to VPN-only or add a reverse proxy layer enforcing additional session binding (IP pinning, token rotation). 4. Rotate all active sessionIds post-patch to invalidate any potentially hijacked sessions. 5. Review tool configurations attached to Chainlit sessions and apply least-privilege: disable tool invocations that are not strictly necessary for each user role. 6. Monitor for lateral movement indicators: unexpected tool invocations or data access patterns from sessions that recently used restore_existing_session.
What systems are affected by CVE-2026-56104?
This vulnerability affects the following AI/ML architecture patterns: LLM chat interfaces, AI agent frontends, RAG system UIs, Agentic AI deployments, Internal AI copilots.
What is the CVSS score for CVE-2026-56104?
CVE-2026-56104 has a CVSS v3.1 base score of 7.4 (HIGH).
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0012 Valid Accounts AML.T0049 Exploit Public-Facing Application AML.T0053 AI Agent Tool Invocation AML.T0085.001 AI Agent Tools AML.T0091 Use Alternate Authentication Material Compliance Controls Affected
What are the technical details?
Original Advisory
Chainlit before 2.10.1 contains a session hijacking vulnerability that allows unauthenticated attackers to restore and inherit authenticated user sessions by presenting a valid sessionId during WebSocket session restoration without ownership verification. Attackers can exploit the restore_existing_session path to assume a victim's permissions and roles, enabling unauthorized invocation of tools and access to data restricted to the authenticated victim.
Exploitation Scenario
An attacker targeting an organization's internal AI assistant (Chainlit + LangChain + RAG over internal docs) first performs reconnaissance to obtain a valid sessionId — through network traffic interception on an unencrypted internal segment, extraction from application logs inadvertently exposed via a misconfigured S3 bucket, or by observing sessionIds embedded in browser local storage via an XSS in a co-hosted app. The attacker then connects to the target's Chainlit WebSocket endpoint and issues a restore_existing_session message with the stolen sessionId. The server, lacking ownership verification, fully restores the authenticated session under the victim's identity. The attacker now operates as the victim: invoking file-read tools to exfiltrate documents indexed in the RAG corpus, issuing queries that extract conversation history containing proprietary business context, and potentially triggering code execution tools if the victim's role permits them — all without ever authenticating.
Weaknesses (CWE)
CWE-862 — Missing Authorization: The product does not perform an authorization check when an actor attempts to access a resource or perform an action.
- [Architecture and Design] Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- [Architecture and Design] Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N References
- github.com/Chainlit/chainlit/commit/5effb664f1e0af4a4f0a42fe63ea979676039a7f patch
- github.com/Chainlit/chainlit/pull/2857 issue-tracking
- github.com/Chainlit/chainlit/releases/tag/2.10.1 release-notes
- vulncheck.com/advisories/chainlit-session-hijacking-via-websocket-session-restoration third-party-advisory
Timeline
Related Vulnerabilities
CVE-2026-22219 7.7 chainlit: SSRF allows internal network access
Same package: chainlit CVE-2025-68492 4.2 chainlit: IDOR enables unauthorized data access
Same package: chainlit CVE-2025-53767 10.0 Azure OpenAI: SSRF EoP, no auth required (CVSS 10)
Same attack type: Data Extraction CVE-2025-2828 10.0 LangChain RequestsToolkit: SSRF exposes cloud metadata
Same attack type: Data Extraction CVE-2023-3765 10.0 MLflow: path traversal allows arbitrary file read
Same attack type: Data Extraction