LibreChat/api/server
Danny Avila 630cb59e3b 🛡️ fix: Optionally Block Private IPs On User-Provided baseURL
When an admin configures a custom endpoint with `baseURL: 'user_provided'`,
each end user supplies their own base URL via the UI. Without
validation, a user can point that URL at internal services (cloud
metadata endpoints, intranet APIs, etc.), causing the backend to issue
requests to those addresses on every model-listing fetch.

Add `interface.blockPrivateUserBaseURL` (default `false` to preserve
current behavior). When enabled, the `/api/keys` PUT handler parses
the encrypted user-key payload and rejects values whose `baseURL`
fails an http(s) protocol check or resolves to a private, loopback,
or link-local IP. Operators running self-hosted LLMs on private IPs
can leave the flag off; multi-tenant deployments should turn it on.

This is save-time validation; runtime fetch sites should additionally
adopt SSRF-safe agents (defense in depth).
2026-05-03 13:51:13 -04:00
..
controllers 🧬 chore: Align LibreChat With Agents LangChain Upgrade (#12922) 2026-05-03 12:46:01 -04:00
middleware 🧬 feat: Scaffold Skills CRUD with ACL Sharing and File Schema (#12613) 2026-04-25 04:01:59 -04:00
routes 🛡️ fix: Optionally Block Private IPs On User-Provided baseURL 2026-05-03 13:51:13 -04:00
services 🧬 chore: Align LibreChat With Agents LangChain Upgrade (#12922) 2026-05-03 12:46:01 -04:00
utils 🛡️ fix: Optionally Block Private IPs On User-Provided baseURL 2026-05-03 13:51:13 -04:00
cleanup.js 🧹 refactor: Tighten Config Schema Typing and Remove Deprecated Fields (#12452) 2026-03-29 01:10:57 -04:00
experimental.js 🧬 feat: Scaffold Skills CRUD with ACL Sharing and File Schema (#12613) 2026-04-25 04:01:59 -04:00
index.js 🧬 feat: Scaffold Skills CRUD with ACL Sharing and File Schema (#12613) 2026-04-25 04:01:59 -04:00
index.spec.js 🚦 fix: 404 JSON Responses for Unmatched API Routes (#11976) 2026-02-27 22:49:54 -05:00
socialLogins.js 🔐 feat: Admin Auth Support for SAML and Social OAuth Providers (#12472) 2026-03-30 22:49:44 -04:00