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

Published Jun 2, 2026
·
Updated

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 Software

2 affected components
librechat librechat<=0.7.6
librechat librechat<0.8.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade LibreChat to a version that resolves this vulnerability.

    Fixed in 0.8.3-rc1

Event History

Jun 2, 2026
CVE Published
via MITRE·10:22 PM
Data Sourced
via MITRE·10:22 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:16 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-31942?

CVE-2026-31942 has a high severity score of 7.1.

2

How do I fix CVE-2026-31942?

To fix CVE-2026-31942, ensure you update LibreChat to version 0.7.7 or later, which addresses the insecure direct object reference issue.

3

What is the impact of CVE-2026-31942?

CVE-2026-31942 allows any authenticated user to overwrite other users' API keys, potentially leading to unauthorized access and data manipulation.

4

Which versions of LibreChat are affected by CVE-2026-31942?

LibreChat versions up to and including 0.7.6 are affected by CVE-2026-31942.

5

What does IDOR mean in the context of CVE-2026-31942?

In the context of CVE-2026-31942, IDOR stands for Insecure Direct Object Reference, which allows attackers to access or modify objects they shouldn't have permissions for.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203