JoeCastrom mcp-chat-studio Server-Side Request Forgery Vulnerability
A server-side request forgery vulnerability exists in JoeCastrom mcp-chat-studio up to version 1.5.0 in the LLM Models API component, allowing remote attackers to manipulate the req.query.base_url argument and potentially conduct further attacks.
A server-side request forgery (SSRF) vulnerability has been identified in JoeCastrom’s mcp-chat-studio, affecting versions up to 1.5.0. The vulnerability resides within the LLM Models API, specifically in the server/routes/llm.js file. An attacker can remotely exploit this flaw by manipulating the req.query.base_url argument. This allows the attacker to make arbitrary HTTP requests from the server, potentially leading to information disclosure, internal service access, or other malicious activities. The vulnerability is publicly known and actively discussed, increasing the risk of exploitation. The vendor was notified but has not yet responded.
Attack Chain
- The attacker identifies an mcp-chat-studio instance running a vulnerable version (<= 1.5.0).
- The attacker crafts a malicious HTTP request targeting the
/routes/llm.jsendpoint. - Within the request, the attacker manipulates the
req.query.base_urlparameter to point to an attacker-controlled server or an internal resource. - The mcp-chat-studio server processes the request and, due to the SSRF vulnerability, makes an HTTP request to the URL specified in the
req.query.base_urlparameter. - If the attacker controls the
base_url, they can intercept the request and potentially steal sensitive information. - If the
base_urlpoints to an internal resource, the attacker may gain unauthorized access to internal services or data. - The attacker analyzes the response from the manipulated request to gather information about the internal network or services.
- The attacker leverages the gained information to further compromise the mcp-chat-studio instance or the internal network.
Impact
Successful exploitation of this SSRF vulnerability can allow an attacker to read sensitive data from internal services, potentially leading to credential theft or data exfiltration. It can also be used to pivot to other internal systems, causing a wider breach. The lack of vendor response increases the risk, as no patch or mitigation is currently available. The CVSS v3.1 base score is 7.3, indicating a high severity vulnerability.
Recommendation
- Monitor web server logs for requests to
/routes/llm.jscontaining suspicious URLs in thereq.query.base_urlparameter using the provided Sigma rule. - Implement network segmentation to limit the impact of potential SSRF attacks by restricting access from the mcp-chat-studio server to internal resources.
- Since no patch is available, consider applying a web application firewall (WAF) rule to filter requests to
/routes/llm.jsthat contain potentially malicious URLs in thereq.query.base_urlparameter.
Detection coverage 2
Detect mcp-chat-studio SSRF Attempt via Base URL Manipulation
highDetects potential SSRF attempts in mcp-chat-studio by monitoring requests to /routes/llm.js with suspicious URLs in the base_url parameter.
Detect mcp-chat-studio SSRF Attempt to Internal IPs
highDetects potential SSRF attempts in mcp-chat-studio by monitoring requests to /routes/llm.js with internal IPs in the base_url parameter.
Detection queries are kept inside the platform. Get full rules →