LibreChat/packages
Danny Avila 3b41e392ba
🔒 fix: SSRF Protection and Domain Handling in MCP Server Config (#11234)
* 🔒 fix: Enhance SSRF Protection and Domain Handling in MCP Server Configuration

- Updated the `extractMCPServerDomain` function to return the full origin (protocol://hostname:port) for improved protocol/port matching against allowed domains.
- Enhanced tests for `isMCPDomainAllowed` to validate domain access for internal hostnames and .local TLDs, ensuring proper SSRF protection.
- Added detailed comments in the configuration file to clarify security measures regarding allowed domains and internal target access.

* refactor: Domain Validation for WebSocket Protocols in Action and MCP Handling

- Added comprehensive tests to validate handling of WebSocket URLs in `isActionDomainAllowed` and `isMCPDomainAllowed` functions, ensuring that WebSocket protocols are rejected for OpenAPI Actions while allowed for MCP.
- Updated domain validation logic to support HTTP, HTTPS, WS, and WSS protocols, enhancing security and compliance with specifications.
- Refactored `parseDomainSpec` to improve protocol recognition and validation, ensuring robust handling of domain specifications.
- Introduced detailed comments to clarify the purpose and security implications of domain validation functions.
2026-01-06 13:04:52 -05:00
..
api 🔒 fix: SSRF Protection and Domain Handling in MCP Server Config (#11234) 2026-01-06 13:04:52 -05:00
client 🪜 fix: Layering Conflicts and UX Polish (#11177) 2026-01-02 11:43:03 -05:00
data-provider 🎯 fix: Actions Allowed Domains Handling (#11215) 2026-01-05 14:58:26 -05:00
data-schemas 🎯 fix: Actions Allowed Domains Handling (#11215) 2026-01-05 14:58:26 -05:00