/

CVE-2026-54033

Severity:

HIGH RISK

(7.7)

Server-Side Request Forgery (CWE-918) in LibreChat API

CVE-2026-54033

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Unauthorized access to internal network resources and metadata exposure via SSRF

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

LibreChat allows authenticated users to configure custom OpenAI-compatible API endpoints via a baseURL setting without any SSRF validation.

When misused, this can cause the server to make arbitrary HTTP requests to internal or external addresses, exposing internal services and sensitive metadata.

Affected context

The vulnerability occurs in LibreChat deployments where users can define custom OpenAI-compatible endpoints by setting a baseURL for API requests.

The application constructs outbound HTTP calls directly from this user-controlled baseURL with no restrictions on IP ranges, schemes, or DNS behavior.

Risk is higher in environments where the LibreChat server has network reachability to internal services, cloud metadata endpoints, or management interfaces.

Exploit preconditions

  • Attack surface: Application API or UI where users configure custom OpenAI-compatible baseURL values
  • Required access: Authenticated account with permissions to set or modify provider configuration options
  • Trigger point: Submission of a crafted baseURL followed by any operation that causes the server to send a request (e.g., initiating a chat or test call)
  • Why exploitation is possible: The server trusts the user-supplied baseURL and performs HTTP requests without checks for internal IP ranges, URL schemes, or DNS pinning, allowing redirection of server-side traffic to arbitrary hosts

Why this happens

This issue stems from treating a user-controlled network endpoint configuration as inherently trustworthy and using it directly to construct outbound HTTP requests.

Without SSRF defenses such as private IP filtering, scheme restrictions, or DNS validation, the application can be coerced into acting as a proxy to internal services that are not intended to be exposed externally.

Conceptually this maps to CWE-918: Server-Side Request Forgery (SSRF), where an attacker influences how a server makes network calls, leveraging its privileged network position to access protected resources.

Potential impact

  • May allow access to internal HTTP services reachable only from the LibreChat server
  • Could expose cloud provider metadata endpoints and sensitive configuration data
  • Can facilitate port scanning or service discovery within internal networks
  • May enable interaction with admin panels, debugging interfaces, or APIs not intended for end users
  • Could support chaining with other vulnerabilities (e.g., misconfigured internal services) leading to broader compromise

General mitigation guidance

Effective mitigation focuses on constraining server-initiated network requests and reducing trust in user-supplied endpoint configuration.

Common patterns include:

  • Validating baseURL values against an allow-list of trusted domains or service identifiers rather than arbitrary URLs
  • Enforcing strict IP range controls that block private, link-local, and metadata-related addresses for outbound requests
  • Restricting supported URL schemes to HTTPS and disallowing protocols such as file://, gopher://, or custom handlers
  • Implementing DNS pinning or resolution checks to ensure hostnames cannot be redirected to internal IPs at runtime
  • Isolating the component that performs outbound AI provider calls into a network segment with limited internal reach and least-privilege access

How teams detect issues like this

Detection commonly relies on a combination of configuration review and behavioral monitoring:

  • Static analysis or configuration linting to flag code paths where user-controlled URLs are used directly in HTTP client calls
  • Security-focused code reviews that look for customizable endpoints, missing allow-lists, and absence of IP or scheme validation logic
  • Application-level logging and monitoring of outbound requests, including destination IPs and domains, to identify suspicious internal targets
  • Network-level controls such as egress filtering and firewall rules, with alerts on attempts to reach sensitive internal ranges or metadata services
  • Optional use of automated security testing tools that specialize in SSRF to probe configurable baseURL parameters and similar network settings

Sources

SourceLink
github.comgithub.com/danny-avila/LibreChat/security/advisories/GHSA-gc9r-88c3-7qhq

Frequently asked

questions

It is exploitable by authenticated users through the LibreChat interface or API, but it leverages the server's network position. The attacker typically cannot access internal services directly; instead, they instruct LibreChat to make those requests.

The attacker needs an authenticated account with the ability to set or modify the baseURL for OpenAI-compatible providers. No direct access to the underlying infrastructure is required beyond this configuration capability.

The safest pattern is to avoid arbitrary user-defined URLs for server-initiated requests. Use an allow-list of known provider endpoints, enforce strict validation for any configurable URLs, and block access to private and metadata address spaces.

Treat any user-influenced network destination as untrusted, centralize outbound request logic behind vetted helper functions, enforce IP and scheme restrictions, and complement application checks with egress controls and routine security reviews of configuration features.

Find out what's already
exploitable in your codebase.