| Field | Value |
|---|---|
| CVE / NVD | CVE-2026-32625 |
| Date (index) | 2026-06-02 |
| Affected product (index) | LibreChat — MCP server URL ${VAR} interpolation exfiltrates JWT_SECRET, CREDS_KEY, CREDS_IV, MONGO_URI |
| GHSA ID | GHSA-4pcc-j6m6-wcwx |
| OWASP MCP Top 10 (2025) | MCP01 — Token Mismanagement & Secret Exposure |
| Published / disclosed | 2026-06-02 |
| Ecosystem | Application (vendor product) |
| Component | LibreChat — MCP server URL ${VAR} interpolation exfiltrates JWT_SECRET, CREDS_KEY, CREDS_IV, MONGO_URI |
| EPSS score | 0.029400000 (FIRST EPSS, 2026-06-30) |
| CVSS score | 9.6 CRITICAL CVSS v3.1 (NVD) |
| CWE | CWE-200 (per GHSA-4PCC-J6M6-WCWX) |
| Affected versions | LibreChat < 0.8.4-rc1 |
| Fixed versions | No fixed version listed in NVD/GitHub advisory |
| Fix status | Unfixed |
| Exploit status | Public CVE record |
LibreChat is an enhanced ChatGPT clone supporting multiple AI providers including MCP. In versions up to and including 0.8.3, the MCP server integration’s extractEnvVariable() function unconditionally replaces ${VAR} placeholders in user-supplied MCP server URLs with values from process.env during Zod schema validation. Any authenticated low-privileged user can create a malicious MCP server configuration with a URL pointing to an attacker-controlled domain containing environment variable references such as ${JWT_SECRET}, ${CREDS_KEY}, ${CREDS_IV}, or ${MONGO_URI}. When LibreChat validates or connects to the configured URL, it transmits those secret values in the request, enabling full compromise of the installation’s cryptographic materials and database credentials.
Requires an authenticated user account with permission to create MCP server configurations (low privilege). No admin access needed. Attacker controls an HTTP endpoint to receive the exfiltrated environment variables embedded in request URLs.
extractEnvVariable() applies process.env substitution to the full URL string without an allowlist of permitted variables or sanitization of the result before the URL is used in outbound connections. The Zod validation step triggers the substitution, making it exploitable before any connection is established.
MCP server configuration in LibreChat is a user-facing feature intended for integrating external tools. The ability for any user to specify a server URL — combined with server-side env-var interpolation — turns this feature into a credential-exfiltration channel. The exfiltrated secrets (CREDS_KEY, CREDS_IV) decrypt all stored user credentials; JWT_SECRET allows forging session tokens; MONGO_URI gives direct database access. Full installation compromise from a single low-privileged request.
// extractEnvVariable() in LibreChat ≤ 0.8.3 (simplified):
// url = url.replace(/\${(\w+)}/g, (_, key) => process.env[key] ?? '');
// No allowlist, no redaction — all process.env keys reachable via URL parameter.
Upgrade to LibreChat 0.8.4-rc1 or later. The fix restricts which environment variables may be interpolated into MCP server URLs.
CREATE permission for MCP server configurations to trusted users only.If a public PoC exists, prefer vendor advisories and defensive write-ups; do not host weaponized exploit code in this repository.
package.json. Versions ≤ 0.8.3 are affected.Upgrade to 0.8.4-rc1 or later per the upstream advisory.