
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-31950 is an Insecure Direct Object Reference (IDOR) vulnerability in LibreChat, an open-source ChatGPT-like platform, affecting versions 0.8.2-rc2 and 0.8.2-rc3. The SSE streaming endpoint /api/agents/chat/stream/:streamId fails to verify that the requesting user owns the stream, allowing any authenticated user who obtains or guesses a valid stream ID to read another user's real-time chat content. The vulnerability was published on March 27, 2026, and patched in version 0.8.2. It carries a CVSS v3.1 base score of 5.3 (Medium) (GitHub Advisory, Red Hat CVE).
The root cause is an authorization inconsistency (CWE-284: Improper Access Control; CWE-639: Authorization Bypass Through User-Controlled Key) in the agents route handler (api/server/routes/agents/index.js, lines 38–114). While two sibling endpoints — /chat/status/:conversationId and /chat/abort — correctly compare job.metadata.userId against req.user.id and return HTTP 403 on mismatch, the /chat/stream/:streamId endpoint retrieves the job and immediately begins streaming to any authenticated requester without performing this ownership check. Exploitation requires the attacker to be authenticated (JWT required via router.use(requireJwtAuth)) and to possess a valid, active stream ID; stream IDs are cryptographically random UUIDs (v4, 122 bits of entropy), so brute-force is infeasible — the attacker must obtain the ID through secondary channels such as URL sharing, log leakage, browser history, or shoulder surfing (GitHub Advisory).
Successful exploitation results in a confidentiality breach: an attacker can subscribe to a victim's real-time SSE stream and read all chat content as it is generated, including private messages, AI responses, and tool invocations. Sensitive data exposed may include API keys, passwords, personally identifiable information (PII), and business secrets shared within the chat. The attack is entirely invisible to the victim, there is no integrity or availability impact, and the scope is confined to the LibreChat application itself (GitHub Advisory).
A proof-of-concept exploit with step-by-step curl commands is publicly documented in the GitHub Security Advisory and in a linked Gist (https://gist.github.com/logicx24/465da87ec8d8a9124d671c068bcebef9). There is no evidence of in-the-wild exploitation at this time, and no threat actor attribution has been reported. The EPSS score is approximately 0.028% (0.000280), reflecting low current exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (GitHub Advisory, Red Hat CVE).
conversationId/streamId, leaked server logs, browser history, or by observing network traffic if on the same network.streamId in the JSON body:curl -X POST http://TARGET:3080/api/agents/chat \
-H "Authorization: Bearer $VICTIM_TOKEN" \
-H "Content-Type: application/json" \
-d '{"endpoint":"agents","agentId":"agent_123","text":"Tell me my private API keys","conversationId":null,"parentMessageId":"00000000-0000-0000-0000-000000000000"}'
# Response: {"streamId":"abc-123-def",...}curl -N http://TARGET:3080/api/agents/chat/stream/abc-123-def \
-H "Authorization: Bearer $ATTACKER_TOKEN" \
-H "User-Agent: Mozilla/5.0" \
-H "Accept: text/event-stream"event: message
data: {"content":"Here are your API keys: sk-...","role":"assistant"}
event: runStep
data: {"tool":"code_interpreter","input":"fetch_secrets()"}/api/agents/chat/stream/<uuid> from a user account that did not initiate the corresponding chat session; multiple authenticated users connecting to the same stream ID simultaneously.streamId accessed by different userId values or JWT tokens; requests to the SSE stream endpoint from IP addresses or user accounts inconsistent with the conversation owner.Upgrade LibreChat to version 0.8.2 or later, which patches the issue by adding an ownership check to the /api/agents/chat/stream/:streamId endpoint consistent with the protections already present on the /chat/status/:conversationId and /chat/abort endpoints. If immediate patching is not possible, restrict network-level access to the /api/agents/chat/stream/ endpoint to trusted users or networks, or implement an additional authentication/authorization layer at a reverse proxy. Monitor server access logs for anomalous cross-user stream subscriptions as a detective control (GitHub Advisory, Red Hat CVE).
The vulnerability was reported by security researcher logicx24, who provided a detailed advisory and a full PoC script. The LibreChat maintainers acknowledged and patched the issue promptly in version 0.8.2, published the GitHub Security Advisory on March 27, 2026, and credited the reporter. No significant broader media coverage or notable social media discussion beyond the advisory itself has been identified (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."