Executive brief
mcp-searxng is a Model Context Protocol server that integrates SearXNG search functionality. The application leaks SearXNG Basic Authentication credentials (username and password) embedded in the SEARXNG_URL environment variable through multiple channels: startup console output, MCP logging notifications sent to connected clients, and JSON-RPC error responses. An attacker with access to logs or a connected MCP client can extract these credentials and gain unauthorized access to the configured SearXNG instance.
Technical details
The vulnerability is a credential information disclosure flaw affecting mcp-searxng's handling of Basic Authentication credentials embedded in URLs. The root cause is the failure to apply the existing redactSearxngInstanceUrl() sanitization function before logging or error handling. Credentials are exposed through three distinct paths: (1) stderr output during server startup when printing raw environment variable values; (2) MCP notifications/message logging notifications sent after client connection; and (3) configuration validation error messages included in both MCP logs and JSON-RPC error responses. The vulnerable code retrieves unmodified SEARXNG_URL values via getSearxngInstances() and outputs them directly without redaction. Attack vectors include any connected MCP client receiving logging notifications, callers of tools that trigger validation errors, local users accessing stderr logs, and centralized logging systems. No authentication is required; the exposure occurs during normal operation. A patch is available in version 1.12.0 which applies credential redaction consistently across all logging and error paths.
Affected products
- ihor-sokoliuk mcp-searxng < 1.12.0
Timeline
- 2026-07-26: disclosed: Initial advisory publication
- 2026-08-19: patched: Version 1.12.0 released with credential redaction fixes
References
- https://api.github.com/users/NARKHEDE-VAIBHAV
- https://github.com/NARKHEDE-VAIBHAV
- https://api.github.com/users/NARKHEDE-VAIBHAV/gists%7B/gist_id%7D
- https://api.github.com/users/NARKHEDE-VAIBHAV/repos
- https://avatars.githubusercontent.com/u/105349101?v=4
- https://api.github.com/users/NARKHEDE-VAIBHAV/events%7B/privacy%7D