The vulnerability lies in the logging of sensitive information from incoming HTTP requests to the /mcp endpoint. The analysis of the patch between the vulnerable version 2.47.10 and the patched version 2.47.11 reveals two key locations where this logging occurred.
First, and most critically, within the SingleSessionHTTPServer.start method, the route handler for POST /mcp logged the full request details, including headers and body content, before any authentication checks were performed. This is the root cause of the vulnerability described in the advisory, as it allows an unauthenticated attacker to have their sensitive data (e.g., attempted Authorization headers) logged. The patch completely removes this pre-authentication logging block.
Second, the SingleSessionHTTPServer.handleRequest method, which is called for authenticated requests, also logged the full request body. The patch mitigates this by replacing the direct logging of the body with a call to a new summarizeMcpBody function. This function creates a safe summary of the request body, excluding any sensitive parameters.
Additionally, a new redactHeaders function was introduced and used to scrub sensitive headers like Authorization and x-n8n-key from the logs for authenticated requests.
The vulnerable functions are therefore the anonymous route handler defined in SingleSessionHTTPServer.start and the SingleSessionHTTPServer.handleRequest method, as they were responsible for the insecure logging.