Apr 28, 2026·6 min read·21 visits
n8n-mcp logs sensitive tool-call arguments in cleartext when running in HTTP mode. Update to version 2.47.3 to remove the vulnerable logging configuration.
The n8n-mcp npm package prior to version 2.47.3 contains an information disclosure vulnerability when operating in HTTP mode. The server explicitly logs incoming JSON-RPC request bodies, which exposes sensitive tool-call arguments, including API keys and internal data, to application logs in cleartext.
The n8n-mcp package provides a Model Context Protocol (MCP) server implementation for interacting with n8n workflows. When the server is configured to operate in HTTP mode (Single Session), it handles incoming JSON-RPC requests from AI assistants and other clients. The implementation of the HTTP handler inadvertently records the entire parsed request body to standard logging facilities.
This behavior introduces a CWE-532 (Insertion of Sensitive Information into Log File) vulnerability. The Model Context Protocol uses the params field of the JSON-RPC request to transmit operational data, which frequently includes API keys, authentication tokens, private infrastructure URLs, and sensitive user input destined for workflow processing.
By persisting this cleartext data to standard output or log files, the application breaks the confidentiality boundary of the encrypted HTTP transport. Log management systems, which typically possess less stringent access controls than production databases or secret managers, will permanently index these credentials.
The root cause exists within the SingleSessionHTTPServer class located in the http-server-single-session.ts file. This component is responsible for intercepting and routing HTTP requests containing MCP tool calls. When a request is authenticated and processed, the server logs an informational message indicating that a request is being handled.
The developers explicitly constructed the log object by referencing the params attribute of the incoming JSON body. Unlike HTTP headers, where developers frequently apply redaction filters, the JSON-RPC payload was treated as safe diagnostic data. The application did not differentiate between generic operational arguments and sensitive authentication material passed within the same object structure.
The logging instruction executes synchronously upon request receipt. Because the log aggregator records the raw properties of the req.body object, any AI assistant executing a tool call that requires secrets will automatically inject those secrets into the application's logging stream. The vulnerability is fundamentally a failure to sanitize untrusted structured data before passing it to an I/O subsystem.
The vulnerability stems from an explicit logging call in the HTTP request handler. The code constructs an object using properties directly extracted from the incoming request body, notably including the params field.
// PRE-PATCH (Vulnerable)
logger.info('handleRequest: Processing MCP request', {
method: req.body?.method,
params: req.body?.params, // Vulnerable parameter logging
id: req.body?.id
});The patch implemented in version 2.47.3 (commit 643c98bcf7663fe8f08f6dfd21d2ddeb56634387) removes the params field from the logging output entirely. This fix directly addresses the CodeQL js/clear-text-logging alert by dropping the untrusted data from the diagnostic output.
// POST-PATCH (Fixed)
logger.info('handleRequest: Processing MCP request', {
method: req.body?.method,
id: req.body?.id // Safe attributes retained
});This remediation is complete for this specific code path. By strictly limiting the logged fields to operational metadata (method and id), the developers ensure that user-provided arguments cannot inadvertently bleed into the logging infrastructure. This approach is superior to implementing a regex-based redaction filter, which is prone to bypasses and maintenance overhead.
Exploitation of this vulnerability requires access to the application's logging infrastructure rather than direct network access to the MCP server. The attack is passive; the threat actor monitors log files, container stdout streams, or centralized logging platforms (such as ELK, Splunk, or Datadog) to extract harvested credentials.
A typical exploitation scenario involves an attacker who has compromised a secondary system or holds internal privileges that grant log read access. When a legitimate user interacts with an AI assistant to trigger an n8n workflow, the assistant generates a tool call.
The resulting log entry provides the attacker with structured, easily parseable cleartext credentials. A sample log entry appears as follows: info: handleRequest: Processing MCP request { method: 'tools/call', params: { name: 'n8n_run_workflow', arguments: { apiKey: 'SECRET_VALUE' } }, id: 1 }. Attackers can utilize automated scripts to continuously scrape these logs for regex patterns matching API keys or session tokens.
The primary impact is a severe loss of confidentiality for systems integrating with the n8n-mcp service. API keys, database connection strings, and user credentials passed as arguments to n8n workflows are routinely exposed. This exposure facilitates horizontal privilege escalation, allowing an attacker to authenticate to internal services bypassing normal access controls.
The severity of the impact depends heavily on the deployment environment's log retention and access policies. In environments where logs are forwarded to shared dashboards or retained indefinitely, the window of exposure is significant. Developers often assume that authenticated HTTP traffic is secure, making the silent leakage into backend logs particularly dangerous.
Furthermore, this logging behavior violates standard compliance frameworks (such as SOC2, PCI-DSS, and GDPR) which strictly prohibit the cleartext storage of sensitive authentication material or personally identifiable information (PII). Organizations discovering this vulnerability must assume that any credentials used in conjunction with the MCP server prior to patching have been compromised.
The primary remediation is to upgrade the n8n-mcp package to version 2.47.3 or later. This version implements the necessary code changes to prevent the logging of the params object. Developers should verify the installed version by inspecting the package.json lockfiles and executing npm update n8n-mcp.
Applying the patch does not secure credentials that have already been written to log files. Organizations must identify the location of their logging data and execute a purge of historical logs containing the handleRequest: Processing MCP request string. If targeted log deletion is not feasible, log rotation policies should be aggressively accelerated to drop the vulnerable historical data.
Finally, all security tokens, API keys, and passwords that were transmitted to the MCP server during the vulnerable period must be considered compromised and rotated immediately. Relying solely on patching the library without rotating exposed credentials leaves the system vulnerable to exploitation using historical log data.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
n8n-mcp n8n-mcp maintainers | < 2.47.3 | 2.47.3 |
| Attribute | Detail |
|---|---|
| Vulnerability Type | CWE-532: Insertion of Sensitive Information into Log File |
| Attack Vector | Local / Log Access |
| Impact | High Confidentiality Loss |
| Exploit Status | Passive Information Disclosure |
| CVSS Score | 5.3 (Moderate) |
| Affected Component | n8n-mcp < 2.47.3 |
The software records sensitive information into a log file, which may allow attackers to extract credentials or private data.
CVE-2024-29203 identifies a cross-site scripting (XSS) vulnerability in the content ingestion and parsing mechanics of TinyMCE rich text editor. Due to a failure to enforce sandbox attributes on dynamic iframe elements and safely handle legacy embed objects, unauthenticated attackers can inject malicious elements that execute scripts within the context of the parent application session.
A technical breakdown of the OS command injection vulnerability in the shell-quote NPM package (CVE-2026-9277 / GHSA-w7jw-789q-3m8p). The bug resides in the character-by-character backslash-escaping logic applied to the .op field of object-tokens within the quote() function, which fails to match and escape line terminators due to a regex matching oversight in JavaScript. This allows unauthenticated remote attackers to execute arbitrary shell commands if they can control inputs processed by this library.
A high-severity memory corruption vulnerability exists in the V8 JavaScript engine of Google Chrome before versions 149.0.7827.102/103. The flaw arises from an incorrect bounds-check elimination during JIT compilation by the TurboFan optimizer, allowing remote attackers to achieve out-of-bounds read and write access inside the sandboxed renderer process.
An improper authentication vulnerability (CWE-287) exists in the legacy, deprecated Internet Key Exchange version 1 (IKEv1) key exchange protocol implementation in Check Point Security Gateways. The vulnerability is caused by a logic flow weakness during the certificate validation process for Remote Access VPN and Mobile Access (SSL VPN) connections. An unauthenticated remote attacker can exploit this weakness to bypass user authentication entirely, establishing a fully functional Remote Access VPN connection without a valid password.
GeoNode versions prior to 4.4.5 and 5.0.2 are vulnerable to Server-Side Request Forgery (SSRF) in the service registration endpoint. Authenticated attackers with low privileges can exploit insufficient input validation in the Web Map Service (WMS) registration module to force the application server to make outbound network queries to loopback addresses, private RFC1918 subnets, link-local scopes, and cloud metadata endpoints. This technical report details the mechanics of the vulnerability, the underlying architectural flaw, and how to effectively remediate and mitigate the associated security risks.
CVE-2022-0492 is a high-severity missing authorization vulnerability in the Linux kernel's Control Groups (cgroups) v1 implementation. The flaw resides within the cgroup_release_agent_write function in kernel/cgroup/cgroup-v1.c, where the kernel fails to validate if the process writing to the release_agent file possesses administrative capabilities in the initial user namespace. This allows a local attacker inside a container with root privileges (UID 0) to abuse user namespaces, mount a cgroups v1 directory, modify the release_agent parameter, and execute arbitrary commands on the host system as host root, effectively achieving a complete container escape.