CVE-2026-31951

LibreChat's MCP Server Header Injection Enables OAuth Token Theft

Published Mar 27, 2026 CVSS 3.1 · 6.8 Medium EPSS < 1% KEV · Not listed
Description
LibreChat is a ChatGPT clone with additional features. In versions 0.8.2-rc1 through 0.8.3-rc1, user-created MCP (Model Context Protocol) servers can include arbitrary HTTP headers that undergo credential placeholder substitution. An attacker can create a malicious MCP server with headers containing `{{LIBRECHAT_OPENID_ACCESS_TOKEN}}` (and others), causing victims who call tools on that server to have their OAuth tokens exfiltrated. Version 0.8.3-rc2 fixes the issue.

Analysis

AI-generated

Technical impact

LibreChat versions 0.8.2-rc1 through 0.8.3-rc1 allow user‑created MCP servers to inject arbitrary HTTP headers that are processed on the server side with credential placeholder substitution. An attacker can embed the placeholder {{LIBRECHAT_OPENID_ACCESS_TOKEN}} into a header so that any user who invokes a tool on that MCP server has their OAuth token automatically captured and sent to the attacker. The primary impact is the exfiltration of user authentication tokens, which can be used to impersonate the user or gain unauthorized access to services.

Affected Systems

The affected product is LibreChat, a ChatGPT clone developed by danny‑avila. Vulnerable releases range from 0.8.2‑rc1 to 0.8.3‑rc1 inclusive. The issue was fixed in 0.8.3‑rc2 and later releases, so administrators should upgrade to at least that version to eliminate the risk.

Risk and Exploitability

The CVSS score of 6.8 indicates moderate severity, but the EPSS score is below 1 %, showing a low current likelihood of exploitation. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires an attacker to host a malicious MCP server and for a victim to execute a tool that contacts that server, so attack feasibility is contingent on user interaction with the compromised server. Given these conditions, the overall risk is moderate but exploitable in environments where user‑created MCP servers are routinely used.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update LibreChat to version 0.8.3‑rc2 or any newer release that applies the fix
  • If updating immediately is not possible, restrict use of user‑created MCP servers or remove known malicious servers from the configuration
  • Monitor OAuth token usage logs for unexpected redirection or transmission to external hosts
  • Check the LibreChat project repository or vendor announcements for additional security patches or updates

Generated by OpenCVE AI on March 31, 2026 at 05:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Librechat
Librechat librechat
CPEs cpe:2.3:a:librechat:librechat:*:*:*:*:*:*:*:*
cpe:2.3:a:librechat:librechat:0.8.3:rc1:*:*:*:*:*:*
Vendors & Products Librechat
Librechat librechat
Type Values Removed Values Added
First Time appeared Danny-avila
Danny-avila libre Chat
Vendors & Products Danny-avila
Danny-avila libre Chat
Type Values Removed Values Added
Description LibreChat is a ChatGPT clone with additional features. In versions 0.8.2-rc1 through 0.8.3-rc1, user-created MCP (Model Context Protocol) servers can include arbitrary HTTP headers that undergo credential placeholder substitution. An attacker can create a malicious MCP server with headers containing `{{LIBRECHAT_OPENID_ACCESS_TOKEN}}` (and others), causing victims who call tools on that server to have their OAuth tokens exfiltrated. Version 0.8.3-rc2 fixes the issue.
Title LibreChat's MCP Server Header Injection Enables OAuth Token Theft
Weaknesses CWE-200
References
Metrics cvssV3_1

{'score': 6.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N'}

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 31, 2026, 1:46 PM
Reserved
Mar 10, 2026, 3:10 PM
Status
Analyzed
Published
Mar 27, 2026, 8:16 PM
Modified
Oct 26, 2026, 9:10 PM