CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-HJWH-XVFW-QRWJ

GHSA-HJWH-XVFW-QRWJ: Credential Disclosure via Diagnostic Boundaries in mcp-searxng

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 20, 2026·6 min read·20 visits

Executive Summary (TL;DR)

mcp-searxng before 1.12.0 leaks plain-text SearXNG Basic Authentication credentials via standard error logs, MCP notifications, and JSON-RPC error outputs. Upgrading to 1.12.0 remediates the issue via a robust diagnostic sanitization layer.

A credential disclosure vulnerability in the mcp-searxng NPM package prior to version 1.12.0 allows attackers to recover plain-text SearXNG Basic Authentication credentials. The application exposes these credentials via console logs (stderr), MCP logging notifications, validation error messages, and JSON-RPC error responses. This occurs because the application lacks comprehensive sanitization across diagnostic boundaries when credentials are parsed from the SEARXNG_URL environment variable.

Vulnerability Overview

The mcp-searxng package is an implementation of the Model Context Protocol (MCP) designed to expose SearXNG private search capabilities to artificial intelligence assistants. In typical deployments, the server connects to a private SearXNG instance using credentials provided through the SEARXNG_URL environment variable. This configuration contains Basic Authentication credentials in plain-text format, which are parsed dynamically during system operations.

The application exposes a significant attack surface by failing to isolate diagnostic data across systemic boundaries. When errors or normal startup routines execute, the component forwards configuration parameters to stdout, stderr, and network communication channels. This behavior allows anyone with read permission on system streams or access to the MCP protocol messages to acquire active system credentials.

The core vulnerability belongs to the CWE-209 (Generation of Error Message Containing Sensitive Information) and CWE-532 (Insertion of Sensitive Information into Log File) classes. Exploitation allows local actors or connected remote clients to obtain full read-access to the underlying SearXNG search database by extracting administrative credentials. The lack of structured redaction guarantees that any diagnostic exception results in the immediate exposure of raw credentials.

Root Cause Analysis

The underlying flaw is located within the startup, logging, and exception aggregation mechanisms of mcp-searxng versions prior to 1.12.0. While a redaction utility named redactSearxngInstanceUrl() existed in src/searxng-instances.ts, the application failed to invoke this function systematically across diagnostic boundaries. This omission created multiple vectors where sensitive environment configurations containing raw authentication tokens bypassed protection layers.

The first vector occurs during initialization in src/index.ts where the system logs active search endpoints. The code queries getSearxngInstances() and directly maps the output arrays to a formatted string written to console.error. Because the URLs are output without sanitization, any administrative username and password values defined within the URI userinfo block are exposed in plain text within system logs.

The second vector involves protocol-level notification logging using the logMessage() helper inside src/index.ts. Once an MCP client completes the handshake, the server sends JSON-RPC telemetry notification messages containing the raw SEARXNG_URL value. Any authenticated client, regardless of administrative level, receives these messages automatically. Additionally, validation routines in src/searxng-instances.ts capture URL formatting exceptions and append the raw invalid value into the thrown error string, which is then serialized directly into JSON-RPC error responses.

Code Analysis

In vulnerable versions, the startup configuration is output to standard error streams using direct variable interpolation. The following code fragment from src/index.ts illustrates the unredacted logging path:

// Vulnerable startup initialization logs raw array contents to console.error
const searxngInstances = getSearxngInstances();
if (searxngInstances.length > 0) {
  console.error(`🌐 SearXNG URLs: ${searxngInstances.join("; ")}`);
}

This routine does not call any sanitization layers, ensuring that any user credentials stored inside the URI string are printed to the runtime logs.

The patched version resolves this exposure by implementing a centralized diagnostic sanitizer. In src/diagnostic-sanitizer.ts, the application implements sanitizeDiagnosticText() and sanitizeDiagnosticValue() to filter outbound data. During initialization, the application captures a snapshot of configured credentials and processes multiple potential representations, including percent-encoded, Base64-encoded, and plain-text forms.

// Patched startup logs utilize sanitizeDiagnosticText for boundary protection
const searxngInstances = getSearxngInstances();
if (searxngInstances.length > 0) {
  console.error(sanitizeDiagnosticText(`🌐 SearXNG URLs: ${searxngInstances.join("; ")}`));
}

The implementation uses regular expressions to strip the username and password authority parameters from HTTP and HTTPS URLs, replacing them with generic redacted values.

Evaluating the effectiveness of this patch shows a complete architecture change for diagnostic management. The sanitizer dynamically hooks error generation, ensuring that thrown objects run through sanitizeErrorForTransport() before being serialized into JSON-RPC payloads. The inclusion of complex encoding conversions (such as Base64 representation of username:password strings) prevents bypasses where credentials leak via HTTP Authorization header equivalents in raw debugging traces. The mitigation is complete because it controls all egress paths.

Exploitation & Attack Methodology

Exploitation of this vulnerability requires either local access to standard diagnostic streams or an active client connection to the MCP server. An attacker seeking to extract credentials locally must read the standard error (stderr) stream output by the Node.js process. In automated environments, this is achieved by reading container logs or inspecting shared journal files.

Alternatively, a client connected to the MCP daemon can retrieve credentials remotely by interacting with the JSON-RPC interface. Upon sending a standard initialize request, the server returns configuration details via automatic notifications/message payloads. Triggering validation rules is also effective; sending queries that violate target schemes forces the internal parser to throw validation errors that return the complete string containing the credentials.

The flow of the credential leak is illustrated below. The raw environment variables transit through the insecure logging boundary and validation wrappers, generating unredacted diagnostics:

Impact Assessment

The impact of this disclosure is high confidentiality loss for the associated SearXNG instance. Because SearXNG servers can be configured to protect sensitive indexes or private lookup endpoints, compromising these credentials allows attackers to execute searches, harvest information, and consume resources of the downstream target. The exposed credentials can also be reused if the target utilizes identical Basic Authentication tokens across other infrastructure nodes.

The CVSS v3.1 score is evaluated at 5.5, indicating Medium severity. The local attack vector metric (AV:L) reflects the standard deployment model where MCP servers communicate over standard input/output transport layers bound to the parent process. If the MCP server is configured to run over network transports (such as WebSockets or remote HTTP bridges), the exploitation vector expands to network-accessible scopes.

No active exploitation in the wild has been observed or reported in threat databases, and the issue is not listed in the CISA KEV catalog. However, the availability of public proof-of-concept steps increases the likelihood of opportunistic exploitation in misconfigured shared host environments or automated log collection servers.

Remediation & Mitigation Guidance

Remediation of this vulnerability requires immediate migration to mcp-searxng version 1.12.0 or higher. The upgraded package introduces the robust diagnostic sanitizer, which automatically redacts credentials from both stdout/stderr logs and outgoing JSON-RPC error frames. To apply the patch, execute npm install mcp-searxng@latest within the application environment.

In addition to upgrading the package, administrators must rotate the Basic Authentication credentials of the configured SearXNG search servers. Since older versions of the software wrote to standard logs, historical database indices and system aggregation streams may contain cached plaintext credentials. These files must be sanitized or purged to prevent backward-looking credential harvesting.

For downstream developers, configurations inside .mcp/server.json should be verified. The parameter SEARXNG_URL must have its isSecret property set to true to ensure MCP clients mask values in administrative portals. Applying these configurations blocks UI-level disclosure and enforces end-to-end credential containment.

Official Patches

GitHubRemediated Patch Release

Technical Appendix

CVSS Score
5.5/ 10
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Affected Systems

mcp-searxng NPM package

Affected Versions Detail

Product
Affected Versions
Fixed Version
mcp-searxng
ihor-sokoliuk
< 1.12.01.12.0
AttributeDetail
CWE IDCWE-209, CWE-532
Attack VectorLocal (AV:L) / Logical exposure via MCP clients
CVSS Score5.5 (Medium)
Exploit StatusProof of Concept (PoC) documented
Affected Versions< 1.12.0
Patched Version1.12.0
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1552.001Unsecured Credentials: Credentials in Files
Credential Access
T1213Data from Information Repositories
Collection
T1592Gather Victim Host Information
Reconnaissance
CWE-209
Generation of Error Message Containing Sensitive Information

The application contains an exposure of sensitive information via system logs and error payloads due to improper output sanitization.

Vulnerability Timeline

mcp-searxng version 1.11.0 is released, introducing authentication support
2026-07-06
mcp-searxng version 1.11.1 is released
2026-07-14
mcp-searxng version 1.12.0 is released, fixing the credential disclosure flaw
2026-07-25
GitHub Advisory GHSA-hjwh-xvfw-qrwj is published
2026-08-19

References & Sources

  • [1]GitHub Security Advisory GHSA-hjwh-xvfw-qrwj
  • [2]mcp-searxng Internal Security Advisory

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-62297
7.5

CVE-2026-62297: Uncontrolled Memory Allocation and Denial of Service in ag-psd

An uncontrolled memory allocation vulnerability exists in ag-psd versions prior to 31.0.0. When parsing Adobe Photoshop Document (PSD) files, the readPsd() function reads image dimensions and color depth directly from the file header and allocates off-heap typed arrays without validating whether the requested memory size is proportional to the input stream or bounded by operational thresholds. An unauthenticated attacker can supply a crafted 52-byte PSD payload that triggers an immediate 3.35 GB memory allocation, resulting in process termination via the operating system Out-Of-Memory (OOM) killer.

Amit Schendel
Amit Schendel
2 views•10 min read
•about 2 hours ago•CVE-2026-126297
7.5

CVE-2026-126297: Algorithmic Complexity Denial of Service in NLTK ConllCorpusReader

CVE-2026-126297 (GHSA-v8f3-6phw-6mh9) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. Located in the Semantic Role Labeling (SRL) parser within `nltk/corpus/reader/conll.py`, the flaw allows an attacker to trigger quadratic O(N^2) CPU processing overhead by providing crafted CoNLL-formatted corpus inputs containing decoy span columns or nested full-width verb spans. Applications parsing untrusted linguistic corpora can experience prolonged CPU exhaustion and application-level Denial of Service (DoS).

Amit Schendel
Amit Schendel
3 views•12 min read
•about 3 hours ago•CVE-2026-126298
7.5

CVE-2026-126298: Quadratic Algorithmic Complexity Denial of Service in NLTK Tree.chomsky_normal_form

CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.

Alon Barad
Alon Barad
6 views•12 min read
•about 4 hours ago•CVE-2026-126299
7.5

CVE-2026-126299: Quadratic Algorithmic Complexity Denial of Service in NLTK CCG Lexicon Parser

An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.

Alon Barad
Alon Barad
5 views•10 min read
•about 5 hours ago•CVE-2026-126295
7.1

CVE-2026-126295: Path Traversal and Unconfined File Access in NLTK BllipParser

CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 6 hours ago•CVE-2026-126300
5.3

CVE-2026-126300: Algorithmic Complexity Denial of Service in NLTK TreebankWordTokenizer.span_tokenize

CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.

Amit Schendel
Amit Schendel
3 views•10 min read