CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-45019

CVE-2026-45019: Server-Side Request Forgery (SSRF) in Chainlit MCP Endpoint

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 25, 2026·6 min read·3 visits

Executive Summary (TL;DR)

Unauthenticated attackers can abuse the Model Context Protocol (MCP) endpoint in Chainlit to execute arbitrary HTTP requests to internal networks and local interfaces.

An unauthenticated server-side request forgery (SSRF) vulnerability exists in Chainlit versions >= 2.4.0rc0 and < 2.12.0 when the Model Context Protocol (MCP) features are enabled. This vulnerability allows remote, unauthenticated attackers to force the backend application server to initiate arbitrary HTTP/HTTPS connections to internal subnets, localhost endpoints, or cloud metadata infrastructure.

Vulnerability Overview

The Model Context Protocol (MCP) feature in the Chainlit conversational AI framework allows developers to integrate external services, APIs, and tools directly into conversational agents. To support these integrations, the platform exposes backend endpoints that communicate with external MCP servers using various protocols, including Server-Sent Events (SSE) and HTTP streaming models. In affected versions of Chainlit, the endpoint designated for connecting new MCP servers, specifically POST /mcp, does not validate client-provided network targets before establishing communication.

Because this endpoint is accessible without authentication by default, it presents a substantial attack surface. When a user requests a connection, the server attempts to parse and resolve the target URL provided in the request payload. In configurations where features.mcp.enabled = true is defined in the configuration, an attacker can submit requests targeting local network interfaces, enabling unauthorized interactions with internal systems.

This vulnerability is classified as a Server-Side Request Forgery (SSRF) and is tracked as CWE-918. Because the server accepts arbitrary destinations without strict validation, it functions as an open proxy to private network sectors that are typically isolated from external internet traffic.

Root Cause Analysis

The primary cause of the vulnerability is the absolute trust placed in the url and headers values provided within the client JSON body during calls to the /mcp endpoint. The platform uses specific Pydantic data models—such as ConnectSseMCPRequest and ConnectStreamableHttpMCPRequest—to validate schema conformance, but these models failed to perform any network-level validation or restriction on the target address.

When a connection payload is received, the backend controller directly extracts the url parameter and passes it to the asynchronous HTTP clients responsible for SSE and streaming HTTP transport mechanisms. There were no access control checks or IP address verification routines implemented to restrict connection attempts to localhost (such as 127.0.0.1 or [::1]), internal private networks defined by RFC 1918 (such as 10.0.0.0/8 or 192.168.0.0/16), or cloud environment metadata endpoints (such as 169.254.169.254).

Additionally, the HTTP client inside the underlying MCP SDK was configured to follow HTTP redirects automatically (follow_redirects=True). This behavior introduces an evasion technique where a target URL pointing to a benign external server responds with an HTTP 3xx redirect directive pointing to a local or internal network address, bypassing trivial string-matching or simple hostname resolution filters if they were present.

Code Analysis

Before the fix was implemented in version 2.12.0, the models in backend/chainlit/types.py parsed incoming payloads directly without validating the destination host:

# Vulnerable implementation in backend/chainlit/types.py
class ConnectSseMCPRequest(BaseModel):
    sessionId: str
    clientType: Literal["sse"]
    name: str
    url: str # Target URL was taken as an unvalidated raw string
    headers: Optional[Dict[str, str]] = None

The server processed this model directly within the connect_mcp routine in backend/chainlit/server.py:

# Vulnerable implementation in backend/chainlit/server.py
if isinstance(mcp_connection, SseMcpConnection):
    transport = await exit_stack.enter_async_context(
        sse_client(
            url=mcp_connection.url, # Unvalidated injection into HTTP client
            headers=mcp_connection.headers,
        )
    )

The patch implemented in commit 0565fd0eccb915fce159929598b053ed79f6e0c9 introduces structured sanitization. The updated workflow requires user-provided connections to match explicit white-lists, and uses a custom validation module to analyze URL characteristics before dispatching requests:

def _has_ambiguous_path(raw_path: str) -> bool:
    lowered = raw_path.lower()
    # Blocks double-encoding and path-traversal bypass patterns
    if any(marker in lowered for marker in ("%2e", "%2f", "%5c", "%25")):
        return True
    if "\\" in raw_path:
        return True
    if any(segment in (".", "..") for segment in raw_path.split("/")):
        return True
    if not raw_path.isascii():
        return True
    try:
        decoded = unquote(raw_path, errors="strict")
    except UnicodeDecodeError:
        return True
    return not decoded.isascii()

This is reinforced by constructing a custom HTTP client factory using httpx.AsyncClient that hooks into the request workflow. It enforces follow_redirects=False and registers a request-checking hook _check_request to validate the resolved IP address of every outgoing destination on the wire immediately before connection, neutralizing DNS rebinding attacks.

Exploitation Methodology

Exploiting this vulnerability requires the target deployment to have MCP enabled. An unauthenticated attacker sends a structured POST request to the /mcp route containing the target host. Because the application server resides inside the internal perimeter, it attempts to establish the connection directly.

To conduct internal host or port scanning, an attacker can supply targets systematically. If the target service is online and accepts the request, the application responds with a connection error or diagnostic message indicative of a protocol mismatch. If the target port is closed or filtered, the server returns a connection timeout or connection refused error after a noticeable delay.

Additionally, attackers can manipulate the headers argument within the payload. Because these headers were previously forwarded without filtering, attackers could inject credentials, Authorization tokens, or session cookies to target private admin panels or internal databases that rely on reverse-proxy authorization headers for security.

Impact Assessment

The impact of CVE-2026-45019 is classified as High, receiving a CVSS 3.1 base score of 7.2. The security scope is modified (S:C) because the vulnerable server acts as a proxy, leveraging its trusted internal positioning to perform actions on other machines within the hosting infrastructure.

In containerized environments and cloud-managed infrastructure, this SSRF permits access to local daemon services, such as Docker sockets, Kubernetes API endpoints, or database administrations panels (e.g., Redis, Elasticsearch, database instances) that do not enforce strict access control controls for internal connections.

When deployed on public cloud engines (such as AWS, GCP, or Azure), the attacker can query the cloud metadata service at 169.254.169.254. This can lead to the exposure of temporary IAM role credentials, resulting in access to cloud storage buckets, databases, and configuration settings.

Remediation and Mitigation

The primary resolution is upgrading the Chainlit framework installation to version 2.12.0 or higher, where the security boundaries and validation factory are implemented.

If upgrading is not immediately possible, you should disable the MCP functionality manually. Open the configuration file located at .chainlit/config.toml and verify that the feature flag is disabled:

[features.mcp]
enabled = false

Additionally, implement strict firewall configuration (such as iptables or cloud security groups) for the application server hosting Chainlit. Block any outbound requests originating from the application user or process that target the local address space (127.0.0.0/8, 169.254.169.254, and private subnets) unless explicitly required by the system architecture.

Official Patches

ChainlitFix Commit on GitHub
ChainlitGitHub Security Advisory

Fix Analysis (1)

Technical Appendix

CVSS Score
7.2/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N

Affected Systems

Chainlit server deployments with features.mcp.enabled = true

Affected Versions Detail

Product
Affected Versions
Fixed Version
Chainlit
Chainlit
>= 2.4.0rc0, < 2.12.02.12.0
AttributeDetail
CWE IDCWE-918
Attack VectorNetwork
CVSS7.2
EPSSNot Available
ImpactServer-Side Request Forgery (SSRF)
Exploit StatusPoC
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1005Data from Local System
Collection
CWE-918
Server-Side Request Forgery (SSRF)

The web server receives a URL or similar vector from an upstream source and retrieves the contents of this URL, but does not sufficiently protect the resource request.

Vulnerability Timeline

Vulnerability discovered and reported to Chainlit maintainers
2026-04-08
Vulnerability validated and confirmed by maintainers
2026-04-08
Official security patch merged and published
2026-08-25
Chainlit version 2.12.0 released
2026-08-25

References & Sources

  • [1]GHSA-hvfh-5mj3-5f3j Security Advisory
  • [2]SPL-2026-002: Chainlit Security Advisory Document
  • [3]Chainlit v2.12.0 Release Changelog

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-45018
9.8

CVE-2026-45018: Unauthenticated Remote Code Execution via MCP stdio Transport in Chainlit

CVE-2026-45018 is a critical command injection vulnerability in Chainlit's Model Context Protocol (MCP) stdio transport backend. By submitting a crafted JSON payload containing dangerous argument options to an unauthenticated HTTP endpoint, a remote attacker can bypass executable validation rules and run arbitrary shell commands with the privileges of the active Python process.

Alon Barad
Alon Barad
2 views•10 min read
•about 3 hours ago•CVE-2026-55099
7.5

CVE-2026-55099: Algorithmic Complexity Denial of Service in icalendar Component Equality

An algorithmic complexity denial of service vulnerability exists in the Python icalendar library's component equality evaluation. Due to recursive nested comparisons inside list membership operations, parsing and validating calendar components with deep nesting triggers exponential execution time, blocking application threads and consuming 100% of the available CPU core.

Alon Barad
Alon Barad
8 views•8 min read
•about 4 hours ago•CVE-2026-54338
5.3

CVE-2026-54338: JupyterHub Unauthenticated Denial of Service via Unbounded Username Logging

JupyterHub is vulnerable to an unauthenticated Denial of Service (DoS) vulnerability. Prior to version 5.5.0, form-based authenticators failed to restrict the size of the username input field on failed logins, allowing remote attackers to exhaust host storage and memory resources.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 5 hours ago•CVE-2026-55605
5.3

CVE-2026-55605: Missing Authentication in @arikusi/deepseek-mcp-server HTTP Transport Endpoint

The self-hosted HTTP transport mode of @arikusi/deepseek-mcp-server (an MCP server for DeepSeek V4) exposes its JSON-RPC endpoint (POST /mcp) without authentication in versions 1.4.2 through 1.7.0. Unauthenticated clients can establish Model Context Protocol sessions and invoke tools, consuming the host's configured DeepSeek API key.

Alon Barad
Alon Barad
8 views•6 min read
•about 6 hours ago•GHSA-VWF3-4XXJ-QG6H
9.8

GHSA-VWF3-4XXJ-QG6H: Server-Side Template Injection in mcp-contextforge-gateway

A Server-Side Template Injection (SSTI) leading to Remote Code Execution (RCE) was discovered in the mcp-contextforge-gateway package before version 1.0.0. The vulnerability stems from an unsandboxed Jinja2 template rendering environment combined with an unsafe fallback mechanism using Python's native str.format() function. Attackers with template modification access could bypass static regex filters to execute arbitrary commands on the hosting platform.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 7 hours ago•CVE-2026-55596
8.7

CVE-2026-55596: DOM-based Cross-Site Scripting (XSS) in Plate Media Embed Component

CVE-2026-55596 is a critical DOM-based Cross-Site Scripting (XSS) vulnerability in the Plate rich-text editor framework (specifically within the @platejs/media package). The issue stems from an optimization fast-path that short-circuits safety parsing if a provider or source URL is already declared on an element. Consequently, serialized documents carrying malicious javascript: URLs bypass protocol sanitization and are loaded directly into iframe elements, leading to code execution.

Amit Schendel
Amit Schendel
5 views•6 min read