CVE-2026-31942

LibreChat has IDOR in API Keys Management that allows any authenticated user to overwrite other users' API keys

HIGH
7.1
CVSS Score
Published: June 2, 2026 at 10:22 PM UTC
Updated: July 22, 2026 at 07:24 PM UTC
2 products affected across 2 vendorsLibreChatLibreChat

Using LibreChat by danny-avila?

Get instant alerts when new vulnerabilities affect LibreChat - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.1
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 0.8.3
Affected range stops below 0.8.3, so it looks safe — our inference, not a vendor statement
v < 0.8.3-rc1
Affected range stops below 0.8.3-rc1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (1)

x_refsource_CONFIRMMitigationVendor Advisory
Source: cverecord
https://github.com/danny-avila/LibreChat/security/advisories/GHSA-5jcj-rh68-cgj7

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.1HIGHGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
LOW
Vector?

Quick Info

StatusANALYZED
CWE
CWE-862

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card