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·25 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

•14 minutes ago•CVE-2026-126300
5.3

CVE-2026-126300: Algorithmic Complexity Denial of Service in NLTK TreebankWordTokenizer.span_tokenize

CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.

Amit Schendel
Amit Schendel
0 views•10 min read
•about 1 hour ago•GHSA-GPWC-27CW-RH9R
5.3

CVE-2026-126301: Quadratic CPU Exhaustion in NLTK LegalitySyllableTokenizer

The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.

Amit Schendel
Amit Schendel
2 views•10 min read
•about 2 hours ago•CVE-2026-126304
8.7

CVE-2026-126304: Symlink Path Traversal in NLTK YCOECorpusReader

CVE-2026-126304 is a symlink path traversal vulnerability (CWE-59) in the Natural Language Toolkit (NLTK) versions 3.10.0 prior to 3.10.4. The YCOECorpusReader class constructs internal sub-readers for the 'psd' and 'pos' subdirectories using FileSystemPathPointer.join(), which relies exclusively on lexical string-prefix validation rather than canonical path resolution. An attacker who supplies a crafted YCOE corpus containing symbolic links in place of the 'psd' or 'pos' subdirectories can bypass directory confinement and read arbitrary files from sibling corpora or sensitive directories within the NLTK data sandbox.

Amit Schendel
Amit Schendel
4 views•9 min read
•about 3 hours ago•CVE-2026-128077
6.5

CVE-2026-128077: Authorization Bypass via Request Path Desynchronization in Nuxt and @nuxt/nitro-server

CVE-2026-128077 (GHSA-r99w-jh2x-3mg9) is an authorization bypass and interpretation conflict vulnerability affecting Nuxt and its underlying @nuxt/nitro-server package in versions 4.6.0 through 4.6.3. When an incoming HTTP request path begins with a double forward slash (e.g., //x/admin), the WHATWG URL parser within the Nuxt server-side page renderer interprets the initial segment as a network host/authority and resolves the remaining path (/admin) against the application's page router. Because Nitro server middleware, route-scoped serverHandlers, and Nitro routeRules evaluate the unparsed request path (//x/admin), path-based access controls, redirects, and security header policies configured for /admin fail to match and are bypassed.

Amit Schendel
Amit Schendel
5 views•10 min read
•about 4 hours ago•CVE-2026-128084
4.8

CVE-2026-128084: Integer Truncation and SQL Query Truncation in sqlite3-ruby

Prior to version 2.10.2, the sqlite3-ruby gem explicitly cast 64-bit Ruby string lengths (long) to 32-bit signed integers (int) when invoking the underlying SQLite C API. On 64-bit platforms, providing a string of 4 GiB (2^32 bytes) or larger causes integer truncation, instructing SQLite to process only a prefix of the string. This flaw affects SQL query preparation, bound parameter values, and return values from custom Ruby-defined SQL functions and aggregates, allowing trailing SQL clauses such as WHERE restrictions to be silently dropped under specific conditions.

Alon Barad
Alon Barad
5 views•11 min read
•about 5 hours ago•CVE-2026-128068
5.3

CVE-2026-128068: Regular Expression Denial of Service in rails-html-sanitizer

CVE-2026-128068 (GHSA-cpgf-5mjf-73p7) is a Regular Expression Denial of Service (ReDoS) vulnerability in the rails-html-sanitizer Ruby gem affecting versions 1.0.3 through 1.7.1. The flaw resides in the Rails::HTML::PermitScrubber#scrub_attribute method, which uses the multiline regular expression /^\s*[^#\s].*/m to enforce local-only URI fragment references on SVG elements. On Ruby runtimes prior to version 3.2 (CRuby <= 3.1 and JRuby), evaluating an attribute value composed of repeated newline and whitespace characters without a hash character triggers quadratic backtracking O(n^2). Applications are only vulnerable if their sanitization allowlist is explicitly configured to permit SVG reference elements such as <use> alongside href or xlink:href attributes.

Alon Barad
Alon Barad
6 views•9 min read