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


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.32% (25th 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-19268245
  • published26 Aug 2026
  • disclosed25 Aug 2026
  • creditqvipin, ladderlogix

Introduced: 25 Aug 2026

NewCVE-2026-45019  (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 /mcp connect handling in backend/chainlit/server.py. An attacker can force the server to make outbound HTTP requests to arbitrary internal or external URLs by sending a POST /mcp request for the sse or streamable-http transport with a user-controlled url and headers. This lets an unauthenticated client probe internal services and cloud metadata endpoints, and send forged requests with attacker-chosen headers such as Authorization and Cookie, breaking the security of deployments with MCP enabled.

Workarounds

  • Set features.mcp.enabled = false in .chainlit/config.toml to disable /mcp entirely and block the SSRF attack path.
  • Restrict outbound egress from the Chainlit host, for example with firewall rules that block access to internal address ranges and cloud metadata endpoints, to prevent the server from reaching attacker-chosen destinations.
  • Configure authentication by registering an auth callback so /mcp requires an authenticated session, which removes the unauthenticated attack path.

CVSS Base Scores

version 4.0
version 3.1