vulnerableVerifiedAGT-2026-0129
mcp-searxng: SearXNG Basic Authentication Credentials Exposed Through MCP Logs and JSON-RPC Error Responses
A real bug in otherwise honest software. Check your version against the affected range below.
GHSA-hjwh-xvfw-qrwj
Summary
mcp-searxng version 1.11.0 exposes SearXNG Basic Authentication credentials embedded in the `SEARXNG_URL` environment variable.
When the server starts in STDIO mode and an MCP client connects, the complete `SEARXNG_URL`, including its username and password, is sent to the client through an MCP `notifications/message` logging notification.
Additionally, when URL validation fails, the complete credential-bearing URL is included in the configuration error. This error is logged through MCP and returned to the client as a JSON-RPC error response.
For example, a value such as:
```text http://username:password@searxng.example.com ```
is exposed without redaction.
A connected MCP client or anyone with access to captured server logs may recover the SearXNG credentials and use them to access the configured SearXNG instance.
The issue was confirmed in:
```text mcp-searxng 1.11.0 ```
Suggested severity: **Medium**
Details
mcp-searxng supports SearXNG Basic Authentication by embedding credentials in the URL userinfo component:
```text https://username:password@searxng.example.com ```
The project contains a redaction function named `redactSearxngInstanceUrl()`, but it is not used in several logging and error-handling paths.
Startup console disclosure
In `src/index.ts:373-378`, the server retrieves the raw SearXNG URLs and writes them directly to stderr:
```typescript const searxngInstances = getSearxngInstances();
if (searxngInstances.length > 0) { console.error(`🌐 SearXNG URLs: ${searxngInstances.join("; ")}`); } ```
`getSearxngInstances()` returns the unmodified environment-variable values.
Relevant code in `src/searxng-instances.ts:25-38`:
```typescript export function parseSearxngUrls( raw: string | undefined = process.env.SEARXNG_URL ): string[] { if (raw === undefined) { return []; }
return raw .split(";") .map((entry) => entry.trim()) .filter((entry) => entry !== ""); }
export function getSearxngInstances(): string[] { return parseSearxngUrls(); } ```
MCP logging notification disclosure
After the MCP client connects, `src/index.ts:388-393` sends the complete URL through the MCP logging interface:
```typescript const searxngInstances = getSearxngInstances();
logMessage( mcpServer, "info", `SearXNG URLs: ${ searxngInstances.length > 0 ? searxngInstances.join("; ") : "not configured" }` ); ```
`logMessage()` passes this value to `sendLoggingMessage()` in `src/logging.ts:15-25`:
```typescript mcpServer.sendLoggingMessage({ level, data: notificationData }); ```
As a result, the connected MCP client receives a message containing the username and password:
```json { "method": "notifications/message", "params": { "level": "info", "data": { "message": "SearXNG URLs: http://username:password@searxng.example.com" } }, "jsonrpc": "2.0" } ```
Configuration error disclosure
The URL validation function includes the complete unredacted value in error messages.
Relevant code in `src/searxng-instances.ts:44-52`:
```typescript export function validateSearxngInstanceUrl( value: string ): string | null { try { const url = new URL(value);
if (!["http:", "https:"].includes(url.protocol)) { return `SEARXNG_URL invalid protocol for "${value}": ${url.protocol}`; } } catch { return `SEARXNG_URL invalid format: ${value}`; }
return null; } ```
The validation error is aggregated by `validateEnvironment()` in `src/error-handler.ts:175-203`:
```typescript const validationError = validateSearxngInstanceUrl(searxngUrl);
if (validationError) { issues.push(validationError); } ```
The complete error is then thrown from `src/search.ts:689-693`:
```typescript const validationError = validateEnvironment();
if (validationError) { logMessage(mcpServer, "error", "Configuration invalid"); throw new MCPSearXNGError(validationError); } ```
The tool handler in `src/index.ts:254-260` sen
Imported from OSV GHSA-hjwh-xvfw-qrwj.
Affected
- npm:mcp-searxng
- < 1.12.0 (fixed in 1.12.0)
Field marks
- Kind
- mcp server
- Reported by
- osv-import
Sources
- osv.dev https://osv.dev/vulnerability/GHSA-hjwh-xvfw-qrwj
- github.com https://github.com/ihor-sokoliuk/mcp-searxng/security/advisories/GHS…
- github.com https://github.com/ihor-sokoliuk/mcp-searxng
- github.com https://github.com/ihor-sokoliuk/mcp-searxng/releases/tag/v1.12.0
Wrong or outdated? Open an issue or PR against corpus/entries/AGT-2026-0129.json.