Skip to content
Heist/ feed
Back to feed
High

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

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-31942
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 17:17 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 2 Jun 2026, 22:22 UTC

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.

osv:CVE-2026-31942
Complete source record
{
  "id": "226377c1cbd048209521433d993da0206a8887644ccdcaf4478dfd95099b27ca",
  "url": "https://osv.dev/vulnerability/CVE-2026-31942",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "LibreChat has IDOR in API Keys Management that allows any authenticated user to overwrite other users' API keys",
    "summary": "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.",
    "evidence": "osv:CVE-2026-31942",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-31942",
      "aliases": [
        "CVE-2026-31942",
        "GHSA-5jcj-rh68-cgj7"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/LibreChat-AI/LibreChat",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "9eeec6bc4f5e856ac65f50784254d484b2808622"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.8.3-rc1"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:librechat:librechat:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.8.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.8.2",
            "chart-1.9.7",
            "v0.8.2-rc3",
            "chart-1.9.6",
            "v0.8.2-rc2",
            "chart-1.9.5",
            "v0.8.2-rc1",
            "v0.8.1",
            "chart-1.9.4",
            "v0.8.1-rc2",
            "chart-1.9.3",
            "v0.8.1-rc1",
            "chart-1.9.2",
            "v0.8.0",
            "chart-1.9.1",
            "v0.8.0-rc4",
            "chart-1.9.0",
            "v0.8.0-rc3",
            "v0.8.0-rc2",
            "v0.8.0-rc1",
            "v0.7.9",
            "librechat-1.8.9",
            "v0.7.9-rc1",
            "v0.7.8",
            "v0.7.8-rc1",
            "v0.7.7",
            "v0.7.7-rc1",
            "v0.7.6",
            "v0.7.6-rc1",
            "v0.7.5",
            "v0.7.5-rc2",
            "v0.7.5-rc1",
            "v0.7.4",
            "v0.7.4-rc1",
            "v0.7.3",
            "v0.7.3-rc2",
            "v0.7.3-rc",
            "v0.7.2",
            "v0.7.1",
            "v0.7.0",
            "v0.6.10",
            "v0.6.9",
            "v0.6.6",
            "v0.6.5",
            "v0.6.1",
            "v0.6.0",
            "v0.5.9",
            "v0.5.8",
            "v0.5.7",
            "v0.5.6",
            "v0.5.5",
            "v0.5.4",
            "v0.5.3",
            "v0.5.2",
            "v0.5.1",
            "v0.5.0",
            "v0.4.8",
            "v0.4.7",
            "v0.4.6",
            "v0.4.5",
            "v0.4.4",
            "v0.4.3",
            "v0.4.2",
            "v0.4.1",
            "v0.4.0",
            "v0.3.3",
            "v0.3.0",
            "v0.2.0",
            "v0.1.1",
            "v0.1.0",
            "v0.0.6",
            "v0.0.3",
            "v0.0.2",
            "v0.0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31942.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:37.799384990Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31942.json",
        "https://github.com/danny-avila/LibreChat/security/advisories/GHSA-5jcj-rh68-cgj7",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-31942"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-862"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31942.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-31942",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 505231,
  "published_at": "2026-06-02T22:22:13.527+00:00"
}