CVE-2026-54030: LibreChat MCP OAuth Token Validation Bypass
LibreChat, a self-hosted ChatGPT alternative that integrates with multiple AI providers, contains a flaw in how it validates OAuth credentials when connecting to Model Context Protocol (MCP) servers. Before version 0.8.5, the application fails to verify that incoming OAuth tokens are actually intended for the server you configured, leaving the door open for a malicious MCP server to intercept and steal those tokens. An attacker would need to trick a user into connecting to their malicious server, but once they do, they gain the ability to impersonate that user across integrated AI services.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 8.0 HIGH · CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
- Weaknesses (CWE)
- CWE-346
- Affected products
- 2 configuration(s)
- Published / Modified
- 2026-06-25 / 2026-06-29
NVD description (verbatim)
LibreChat is an enhanced ChatGPT clone that supports multiple AI providers. Prior to 0.8.5, LibreChat's MCP OAuth implementation does not validate that the resource parameter from OAuth Protected Resource metadata (RFC 9728) matches the configured MCP server URL, allowing a malicious MCP server to steal access tokens intended for a legitimate server. This vulnerability is fixed in 0.8.5.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from missing validation of the 'resource' parameter in OAuth Protected Resource metadata as defined in RFC 9728. When LibreChat receives an OAuth token response from an MCP server connection, it does not verify that the resource parameter—which indicates which server the token is intended for—matches the legitimate MCP server URL the user configured. This allows an attacker controlling a malicious MCP server to return a crafted OAuth response with a resource parameter pointing to a different service, causing LibreChat to accept tokens destined for the legitimate server and store or use them for the attacker's server. The root cause is inadequate input validation during the OAuth handshake for MCP integrations, classified as Incorrect Validation of Specified Quantity in Input (CWE-346).
Business impact
If exploited, this vulnerability could lead to unauthorized access to user accounts on integrated AI platforms and services. An attacker stealing an access token gains the same permissions as the victim, potentially allowing them to read, modify, or delete data within those services, send messages on behalf of the user, or perform other authenticated actions. For organizations deploying LibreChat as an internal tool connected to enterprise AI services, token theft could compromise sensitive data and facilitate lateral movement. The attack requires user interaction (visiting a malicious MCP server), which limits the blast radius but remains a credible threat in environments where users are encouraged to extend LibreChat's capabilities through custom MCP integrations.
Affected systems
LibreChat versions prior to 0.8.5 are affected. The vulnerability applies to any deployment where MCP server connections are enabled and users have the ability to add or be directed to MCP servers. Self-hosted instances are at highest risk, particularly those in environments where MCP server discovery or community-shared server listings are in use. The issue does not affect LibreChat instances that do not use MCP integrations or have disabled OAuth authentication for MCP providers.
Exploitability
Exploitation requires user interaction—specifically, a user must be tricked into connecting to a malicious MCP server or be directed to one via social engineering. The attacker must control an MCP server infrastructure to serve malicious OAuth responses. Once a user is compromised, the token theft occurs automatically during the OAuth handshake. The CVSS vector (AV:N/AC:H/PR:N/UI:R) reflects the network-accessible nature of the attack, the high complexity (requiring an attacker-controlled server), lack of privilege requirement, and mandatory user interaction. This is not a trivial exploit requiring deep technical knowledge of LibreChat internals, but it is well within reach of a moderately skilled adversary.
Remediation
Upgrade LibreChat to version 0.8.5 or later, which implements proper validation of the resource parameter against the configured MCP server URL. No workarounds are available for earlier versions; patching is the only reliable mitigation. Organizations should inventory their LibreChat deployments and prioritize upgrades in environments where MCP integrations are actively used. After patching, consider reviewing MCP server configurations to ensure only trusted servers are whitelisted.
Patch guidance
Apply the 0.8.5 release or any subsequent version. The fix involves server-side validation in the OAuth token handling logic and does not require configuration changes. Before upgrading, test in a non-production environment to ensure compatibility with any custom MCP server integrations. After upgrading, users should be informed that they may need to re-authenticate to MCP servers, and any suspicious token usage in integrated services should be investigated.
Detection guidance
Monitor OAuth token requests and responses in LibreChat logs for resource parameter mismatches between the configured MCP server URL and the value returned in OAuth metadata. Look for user accounts suddenly accessing multiple AI provider services from new geographic locations or with unusual token lifetimes. Inspect MCP server connection logs for failed token validation or rejection events (if available in the patched version). In network monitoring, flag unexpected connections from LibreChat instances to unknown or unauthorized MCP servers, particularly those serving OAuth endpoints. Security teams should review which MCP servers users have connected to and verify their legitimacy.
Why prioritize this
This vulnerability merits immediate attention due to its high CVSS score (8.0), the potential for account takeover across integrated services, and the relative ease of deploying an attack. While user interaction is required, the barrier to exploitation is not prohibitively high—attackers can use phishing or social engineering to direct users to malicious MCP servers. Organizations with active LibreChat deployments handling sensitive data or connected to critical AI services should patch urgently. The lack of KEV status does not diminish the risk; it reflects the vulnerability's recency rather than its severity.
Risk score, explained
The CVSS 8.0 (HIGH) score reflects the combination of high confidentiality and integrity impact (token theft and impersonation), network accessibility, and user interaction requirement. Complexity is rated as high because an attacker must set up a functioning MCP server and social engineer the user, but these are achievable steps. The scope is changed (C), as compromised tokens can be leveraged to access services outside LibreChat itself. The absence of availability impact (no denial of service) prevents a critical rating. For organizations with strict data handling requirements or multi-tenant deployments, the effective risk may be higher due to downstream impact on integrated services.
Frequently asked questions
Does this vulnerability affect users who don't use MCP integrations?
No. If MCP server connections are disabled or not in use within your LibreChat instance, this vulnerability does not apply. Check your deployment configuration to confirm MCP is active.
Can an attacker steal tokens without user interaction?
No, exploitation requires a user to initiate a connection to a malicious MCP server or to be tricked into doing so. Passive network attacks do not trigger the vulnerability.
Are tokens stolen from other services permanently compromised?
The duration of token compromise depends on the token's lifetime and whether the legitimate service detects abnormal usage and revokes it. Upgrading LibreChat and checking for unauthorized token usage in integrated services are both important steps.
What should we do if we suspect token theft has occurred?
Immediately revoke any suspicious OAuth tokens in connected services, reset passwords for affected user accounts, review access logs in integrated services for unauthorized activity, and then upgrade LibreChat to 0.8.5 to prevent future incidents.
This analysis is based on the CVE record and vendor advisory published as of June 2026. While we have taken care to ensure accuracy, this content is provided for informational purposes and should not be construed as professional security advice. Organizations should verify all patch versions and compatibility with their specific LibreChat deployment against official vendor sources. Testing in a non-production environment is strongly recommended before applying patches. SEC.co does not provide exploit code or step-by-step attack instructions. If you believe you have been affected by this vulnerability, consult with your security team or a qualified cybersecurity professional. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-10846HIGHNLnet Labs ldns DNS Spoofing Vulnerability - Off-Path Poisoning Attack
- CVE-2026-11693HIGHGoogle Chrome Site Isolation Bypass via Plugin Flaw
- CVE-2026-41700HIGHSpring for GraphQL WebSocket Cross-Site Hijacking Vulnerability
- CVE-2026-42558HIGHXibo Stored XSS and Iframe Sandbox Escape in Data Connector
- CVE-2026-44698HIGHHome Assistant Companion App Token Theft Vulnerability
- CVE-2026-44894HIGHNetty QUIC Amplification Attack via NoQuicTokenHandler Default
- CVE-2026-45674HIGHNetty DNS CNAME Validation Bypass (CVSS 8.7 HIGH)
- CVE-2026-47265HIGHAIOHTTP Cookie Leak on Cross-Origin Redirects (CVSS 7.5)