Server-side Request Forgery (SSRF) Affecting chainlit package, versions [,2.12.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.22% (13th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-CHAINLIT-22566178
  • published16 Nov 2026
  • disclosed2 Nov 2026
  • creditqvipin, ladderlogix

Introduced: 2 Nov 2026

NewCVE-2026-120492  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

Upgrade chainlit to version 2.12.0 or higher.

Overview

chainlit is a Build Conversational AI.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the connect_mcp handler in backend/chainlit/server.py. When MCP is enabled, an unauthenticated attacker who can open a session can send POST /mcp requests using the SSE or streamable-HTTP transport with an arbitrary URL and attacker-controlled headers, causing the Chainlit server to make outbound requests to internal services or cloud metadata endpoints. Although the responses are not returned to the attacker, forged headers can let them trigger state-changing requests to internal APIs.

Notes

  • The exploit requires features.mcp.enabled = true in .chainlit/config.toml; MCP has been disabled by default since v2.7.0, so deployments retaining that default are not exposed.

Workarounds

  • Set features.mcp.enabled = false in .chainlit/config.toml to prevent exploitation through the /mcp endpoint.
  • Restrict outbound network egress from the Chainlit host with firewall rules blocking internal address ranges and cloud metadata endpoints to limit where SSRF requests can reach.
  • Register an auth callback so /mcp requires an authenticated session; this removes the unauthenticated attack path but does not prevent SSRF by authenticated users.

CVSS Base Scores

version 4.0
version 3.1