Skip to main content

LibreChat CVE-2026-31942

HIGH
Missing Authorization (CWE-862)
2026-06-02 GitHub_M
7.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain authenticated LibreChat account
  2. Delivery
    Identify victim userId
  3. Exploit
    Craft PUT /api/keys with injected userId and attacker keys
  4. Execution
    Server spread overwrites victim record
  5. Persist
    Victim chats route through attacker keys
  6. Impact
    Capture prompts/responses or deny service

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization checks on every request
MITRE ATT&CK

1 technique across 1 tactic: Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Attacker must hold any authenticated LibreChat account (PR:L) on the target instance and be able to reach the PUT /api/keys endpoint over the network; no user interaction from the victim is needed and no special server configuration is required because the vulnerable spread pattern is present in default deployments of versions through 0.7.6. Exploitation is limited to instances that allow the attacker to obtain an account (e.g., open registration, shared internal tenancy, or compromised low-privilege credentials) and is fully blocked on instances upgraded to 0.8.3-rc1.

Impact

The CVSS 7.1 vector AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L reflects a remote, low-complexity, authenticated attack with high integrity impact and low availability impact, no confidentiality loss directly on the API call itself - consistent with overwriting (not reading) victim keys. EPSS and CISA KEV data were not supplied for this CVE, and no public exploit is identified at time of analysis, so this should be treated as a credible but not yet weaponized risk. The practical impact understates downstream confidentiality risk: attacker-controlled keys can silently proxy victims' subsequent conversations, which is a real prioritization driver for multi-tenant LibreChat deployments even though CVSS scores C:N. Authentication is required (PR:L), which limits exposure to instances with public signup or shared tenancy.

Exploit ScenarioDerived

An attacker registers or uses an existing low-privileged LibreChat account, then sends a PUT /api/keys request with a JSON body containing both their own legitimate fields and a userId value targeting a victim along with attacker-controlled OpenAI/Anthropic keys. The victim's subsequent chat sessions are routed through the attacker's keys, allowing silent capture of all prompts and responses or, by supplying invalid keys, a denial of service against the victim's chat functionality.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 02, 2026

Cross-user API key overwrite in LibreChat versions up to and including 0.7.6 allows any authenticated user to replace another user's stored provider API keys (OpenAI, Anthropic, Azure) by injecting a userId parameter into PUT /api/keys requests. The flaw stems from an Insecure Direct Object Reference where the JavaScript spread operator overrides the server-set authenticated user ID, enabling conversation hijacking or denial of service. No public exploit identified at time of analysis, and the issue is fixed in 0.8.3-rc1.

RemediationAI

Upgrade to LibreChat 0.8.3-rc1 or later, which is the vendor-released patched version per advisory GHSA-5jcj-rh68-cgj7 (https://github.com/danny-avila/LibreChat/security/advisories/GHSA-5jcj-rh68-cgj7). If immediate upgrade is not possible, disable open user registration so only trusted users can reach the authenticated endpoint, place an authenticating reverse proxy or WAF rule in front of PUT /api/keys to strip or reject any userId field in the request body, and rotate all stored provider API keys (OpenAI, Anthropic, Azure) after patching since prior overwrites may be undetected; the trade-off of WAF body-rewriting is potential breakage of legitimate future schema changes, and forcing key rotation will require users to re-enter credentials.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

LibreChat (cpe:2.3:a:danny-avila:librechat) is an open-source, self-hosted multi-provider chat interface that brokers requests to upstream LLM APIs using per-user stored credentials. The root cause is CWE-862 (Missing Authorization): the PUT /api/keys handler constructs its update document by spreading the request body after assigning req.user.id, so a client-supplied userId in the body shadows the trusted server value and the database write targets an arbitrary account. This is a classic order-of-assignment IDOR exacerbated by trusting client JSON in a privileged write path.

Know when Librechat gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.1 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L

Primary rating from Vendor (GitHub_M) · only source for this CVE.

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
Low

DescriptionCVE.org

LibreChat is an enhanced ChatGPT clone that supports multiple AI providers. In versions up to and including 0.7.6, an Insecure Direct Object Reference (IDOR) vulnerability exists in the API keys management endpoint (PUT /api/keys). Due to the use of the JavaScript object spread operator after setting the authenticated user's ID, any authenticated user can inject a userId parameter in the request body to overwrite any other user's API keys (e.g., OpenAI, Anthropic, Azure). This allows an attacker to replace a victim's API key configuration, potentially routing the victim's conversations through attacker-controlled keys or denying service by providing invalid keys. This is patched in version 0.8.3-rc1.

Executive ViewAI

Why It Matters

LibreChat versions up to 0.7.6 contain an authentication bypass flaw allowing any logged-in user to steal API credentials (OpenAI, Anthropic, Azure) belonging to other users, enabling unauthorized access to customer cloud services and conversation hijacking. Organizations running multi-tenant LibreChat deployments face immediate risk of API key compromise and data exposure affecting all connected cloud AI services.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: restrict API key feature access to administrators; disable provider-integrated API key storage if not critical to operations; implement network segmentation limiting authenticated user access; monitor PUT /api/keys endpoint for suspicious userId parameter injection; audit authentication logs for unusual cross-user activity patterns. Release candidate 0.8.3-rc1 available for accelerated testing if business risk tolerance permits pre-release deployment.

Threat Intelligence Overview

EPSS Score
0.0%
Top 89% exploitable
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Affected Products (CPE)CVE.org

cpe:2.3:a:danny-avila:librechat:*:*:*:*:*:*:*:*
CVE-2024-11170 HIGH POC
8.8 Mar 20

A vulnerability in danny-avila/librechat version git 81f2936 allows for path traversal due to improper sanitization of f

CVE-2024-10361 CRITICAL POC
9.1 Mar 20

An arbitrary file deletion vulnerability exists in danny-avila/librechat version v0.7.5-rc2, specifically within the /ap

CVE-2026-22252 CRITICAL POC
9.1 Jan 12

LibreChat before v0.8.2-rc2 allows any authenticated user to execute shell commands as root inside the container through

CVE-2025-8850 HIGH POC
8.8 Oct 30

LibreChat 0.7.9 lets an authenticated user turn off two-factor authentication on their own account without supplying a v

CVE-2025-66450 HIGH POC
8.6 Dec 11

Stored cross-site scripting and tracker injection in LibreChat 0.8.0 and earlier allow a user who can create a chat to c

CVE-2025-66201 HIGH POC
8.6 Nov 29

LibreChat is a ChatGPT clone with additional features. Rated high severity (CVSS 8.6), this vulnerability is remotely ex

CVE-2025-69222 HIGH POC
8.1 Jan 07

LibreChat 0.8.1-rc2 has SSRF in the Actions feature that allows authenticated users to make the server perform requests

CVE-2024-11171 HIGH POC
7.5 Mar 20

In danny-avila/librechat version git 0c2a583, there is an improper input validation vulnerability. Rated high severity (

CVE-2025-7104 HIGH POC
7.5 Sep 29

A mass assignment vulnerability exists in danny-avila/librechat, affecting all versions. Rated high severity (CVSS 7.5),

CVE-2025-8849 HIGH POC
7.5 Oct 31

Unbounded `key` and `value` parameters on the LibreChat 0.7.9 memory API (`POST /api/memories` and `PATCH /api/memories/

CVE-2024-11173 MEDIUM POC
6.5 Mar 20

An unhandled exception in the danny-avila/librechat repository, version git 600d217, can cause the server to crash, lead

CVE-2024-10366 MEDIUM POC
6.5 Mar 20

An improper access control vulnerability (IDOR) exists in the delete attachments functionality of danny-avila/librechat

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy