Unauthenticated SSRF in Chainlit MCP Component
Chainlit versions 2.4.0rc0 through 2.11.1 contain an unauthenticated SSRF vulnerability (CVE-2026-45019) in the Model Context Protocol (MCP) component, allowing attackers to perform internal network reconnaissance and interact with internal APIs using attacker-controlled HTTP headers.
CVE search metadata
CVE search record: CVE-2026-45019. Severity: high. CVSS: 7.2. KEV: no. Product: Chainlit (2.4.0rc0 - 2.11.1). Brief: Unauthenticated SSRF in Chainlit MCP Component. Brief link: https://feed.craftedsignal.io/briefs/2026-08-chainlit-ssrf/
Chainlit, an open-source framework for building LLM chat interfaces, is vulnerable to a severe Server-Side Request Forgery (SSRF) flaw when the Model Context Protocol (MCP) feature is enabled. The vulnerability exists in the POST /mcp endpoint, which handles sse and streamable-http transports. When enabled via features.mcp.enabled = true, the application fails to validate the url parameter and improperly forwards a user-supplied headers dictionary to the internal HTTP client.
An unauthenticated remote attacker can force the Chainlit server to execute arbitrary outbound HTTP requests. Because the server forwards attacker-supplied headers, including Authorization and Cookie, this vulnerability allows for unauthorized state-changing operations against internal services and provides a mechanism to probe sensitive cloud metadata endpoints (e.g., 169.254.169.254). The issue impacts all versions from 2.4.0rc0 up to, but not including, 2.12.0. Chainlit has addressed this by introducing a strict allowlist-based configuration model in version 2.12.0.
Attack Chain
- Attacker establishes a connection to the target Chainlit server via Socket.IO or direct HTTP POST to
/mcp. - Attacker crafts a JSON payload for the
/mcpendpoint specifyingclientTypeassseorstreamable-http. - Attacker injects a malicious
urlparameter (e.g., pointing to an internal admin API or metadata service). - Attacker includes a
headersdictionary in the JSON payload containing sensitive authentication tokens or forged cookies. - Chainlit backend receives the request and directly invokes the internal
sse_clientorstreamablehttp_clientusing the unsanitized parameters. - The server initiates an outbound HTTP request from its local context to the specified internal target.
- Internal service processes the forged request, effectively bypassing intended authentication/authorization constraints.
- Attacker achieves unauthorized state change or sensitive data exfiltration against internal infrastructure.
Impact
Successful exploitation allows an unauthenticated attacker to bypass perimeter security to reach internal networks, probe cloud metadata endpoints, and perform state-changing operations against internal APIs. The lack of validation on both the target URL and the forwarded headers means an attacker can authenticate requests as the Chainlit server itself to downstream services. The impact is critical for deployments running in trusted internal network zones or cloud environments where the server instance holds identity-based permissions (e.g., IAM roles).
Recommendation
- Upgrade all Chainlit deployments to version 2.12.0 immediately to implement the new strict allowlist-based MCP configuration.
- If immediate patching is not possible, set
features.mcp.enabled = falsein.chainlit/config.tomlto disable the vulnerable component. - Restrict outbound network egress for the host running the Chainlit process, specifically blocking access to private IP ranges and the cloud metadata service (169.254.169.254).
- Monitor server-side web logs for
POSTrequests to the/mcpendpoint originating from unexpected or untrusted sources. - Enable authentication callbacks for the application to ensure that
/mcpendpoints are not accessible to unauthenticated sessions.
Detection coverage 1
Detect Chainlit Unauthenticated MCP SSRF Attempt
highDetects exploitation attempts against CVE-2026-45019 by identifying POST requests to the /mcp endpoint, which should be restricted or disabled if not explicitly needed.
Detection queries are available on the platform. Get full rules →