Servers and applications
CVE-2026-31945
LibreChat Server-Side Request Forgery using DNS resolution
- Severity
- High 7.7
- Published
- 27 Mar 2026
- Last changed
- 26 Oct 2026
- Added to UpHeron
- 1 Nov 2026
- Exploit chance
- 0.3% in the next 30 daysHigher than 18% of CVEs. EPSS by FIRST, 19 Nov 2026
- Attack
- Over the network · Needs a user account · No user action needed
- Attacker can
- Read data
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N- Also known as
- GHSA-f92m-jpv7-55p2
- Sources
- NVD, Project advisories (GitHub)
Description
LibreChat version 0.8.2 remains 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.
After the SSRF vulnerability in agent actions and MCP was reported, a patch was introduced in version 0.8.2-rc2. (commit 3b41e392) However, isDomainAllowedCore and isSSRFTarget method assumes that the attackers only use localhost-like hostname or a direct private IP address. In practice, it remains possible to trigger SSRF by using a domain that resolves to a private IP address.
Workarounds
A mitigation can be implemented by adding a method that verifies whether the validated hostname resolves to a private IP address after DNS resolution.
- packages/api/src/auth/domain.ts
However, this is only a preliminary patch and does not protect against TOCTOU (Time-of-Check to Time-of-Use) attacks. To properly mitigate this risk, validation must also be enforced at the point where the outbound request is made. In particular, the axios call within packages/data-provider/src/actions.ts should perform its own verification of the resolved IP address immediately before sending the request.
Affected software
| Software | Affected versions |
|---|---|
LibreChatServers and applications · cpe:a:librechat:librechat |
|
LibreChatServers and applications · github:librechat-ai/librechat |
|
About LibreChat
Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
- Docker Hub pulls
- 669,094Docker Hub, 15 Nov 2026
- GitHub stars
- 47,138GitHub, 15 Nov 2026
- Forks
- 9,706GitHub, 15 Nov 2026
- License
- MITGitHub
- First published on GitHub
- 12 Feb 2023GitHub
Source code Website Docker image
Vulnerabilities in LibreChat
- In our list
- 104
- Published in the last 12 months
- 84
- Critical, last 12 months
- 5
- High, last 12 months
- 25
- Known exploited
- 0
- CVE-2026-54041Plaintext password logged on login validation errorLow 3.1 17 Nov 2026
- CVE-2026-54032Remote MCP Server Description XSS via Unsanitized dangerouslySetInnerHTML; secondary Admin Banner sink lacks DOMPurifyMedium 6.1 17 Nov 2026
- CVE-2026-54026Cross-User Message Injection via Parameter Confusion in LibreChatMedium 6.5 17 Nov 2026
- CVE-2026-54031MCP OAuth requests can follow redirects to internal URLs after SSRF validationMedium 6.3 17 Nov 2026
- CVE-2026-54038Server-Side ReDoS via Unescaped Regex in Principal SearchMedium 6.5 17 Nov 2026
- CVE-2026-54045Password Reset Can Wipe Email-Verification Tokens When Verification Is EnforcedMedium 6.5 17 Nov 2026
References
- NVD https://nvd.nist.gov/vuln/detail/CVE-2026-31945
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-31945
- GitHub Advisory Database https://github.com/advisories/GHSA-f92m-jpv7-55p2
- github.com https://github.com/LibreChat-AI/LibreChat/security/advisories/GHSA-f92m-jpv7-55p2