# CVE-2026-31942: LibreChat has IDOR in API Keys Management that allows any authenticated user to overwrite other users' API keys

- Severity: High 7.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2026-06-02T22:22:13.527Z
- Modified: 2026-07-22T19:10:00.120Z
- Weaknesses: CWE-862
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- danny-avila LibreChat: < 0.8.3-rc1
- librechat librechat: before 0.8.3

## References

- <https://github.com/danny-avila/LibreChat/security/advisories/GHSA-5jcj-rh68-cgj7> (mitigation, vendor-advisory)

## Sources

- CVE List: [CVE-2026-31942](https://www.cve.org/CVERecord?id=CVE-2026-31942), CVE Terms of Use, modified 2026-06-03
- NVD: [CVE-2026-31942](https://nvd.nist.gov/vuln/detail/CVE-2026-31942), Public domain, modified 2026-07-22

---

Page: https://cve.day/CVE-2026-31942 · Whole record: https://cve.day/CVE-2026-31942.json · Rebuilt by cve.day 2026-11-25T22:59:23.616Z
