CVE-2026-65589 Overview
CVE-2026-65589 is an information disclosure vulnerability in n8n workflow automation software versions before 1.123.64. The flaw resides in how n8n handles credentials passed as custom HTTP headers within Large Language Model (LLM) sub-node executions. Instead of masking these header values, n8n writes plaintext API keys and secrets directly into workflow execution records. Authenticated users with access to execution data can then read exposed credentials that persist in the database and can be included in exports. The vulnerability is classified under [CWE-532] Insertion of Sensitive Information into Log File.
Critical Impact
Plaintext API keys and secrets used in LLM sub-node HTTP headers are stored unmasked in workflow execution records, allowing authenticated users to harvest credentials for downstream services.
Affected Products
- n8n versions prior to 1.123.64
- Self-hosted n8n deployments using LLM sub-nodes with custom HTTP header authentication
- n8n workflows that route credentials through header-based authentication to LLM providers
Discovery Timeline
- 2026-07-22 - CVE-2026-65589 published to NVD
- 2026-07-22 - Last updated in NVD database
Technical Details for CVE-2026-65589
Vulnerability Analysis
n8n executes workflows as chains of nodes, and LLM sub-nodes commonly authenticate to external providers using HTTP header credentials such as Authorization: Bearer <token> or provider-specific API key headers. During execution, n8n serializes node inputs and outputs into execution data records for auditing and debugging. The credential masking routine that suppresses sensitive fields in standard HTTP request nodes does not cover custom headers processed by LLM sub-nodes. As a result, header values containing bearer tokens, API keys, and provider secrets are written to the execution store in cleartext. Any authenticated user with permission to view executions can retrieve these records through the UI or API. Execution data can also be exported, which extends exposure beyond the running instance.
Root Cause
The root cause is missing credential sanitization in the LLM sub-node execution data serializer. Custom HTTP header credentials bypass the redaction logic applied to first-class credential objects, producing a [CWE-532] condition where sensitive information is persisted in operational logs.
Attack Vector
Exploitation requires an authenticated n8n user with access to workflow execution history. The attacker browses or queries stored executions for workflows that invoke LLM sub-nodes, then extracts plaintext header credentials from the serialized input or output payloads. No user interaction from a workflow owner is required, and exported execution archives carry the same exposure.
No verified proof-of-concept code is publicly available. Refer to the GitHub Security Advisory GHSA-89gh-3pgc-v5h2 and the VulnCheck Advisory on n8n for full technical details.
Detection Methods for CVE-2026-65589
Indicators of Compromise
- Execution records containing recognizable credential patterns such as Bearer , sk-, xoxb-, or provider API key prefixes in header fields
- Unusual read access to the execution_entity table or /rest/executions API endpoints by non-owner accounts
- Export operations targeting executions of workflows that include LLM sub-nodes
- Downstream authentication anomalies on LLM providers such as requests from new IP addresses using known n8n-issued keys
Detection Strategies
- Query the n8n execution database for header field values matching known API key regular expressions to identify affected records
- Audit workflow execution API access logs for accounts enumerating executions across workflows they do not own
- Monitor for outbound API calls to LLM providers originating outside the expected n8n host or automation network
Monitoring Recommendations
- Enable and centralize n8n audit logs covering execution reads, exports, and credential access events
- Alert on bulk export of execution history, particularly archives containing LLM sub-node executions
- Rotate LLM provider keys on a defined cadence and monitor provider-side usage dashboards for anomalies
How to Mitigate CVE-2026-65589
Immediate Actions Required
- Upgrade all n8n instances to version 1.123.64 or later without delay
- Rotate every credential and API key that was configured as a custom HTTP header in an LLM sub-node prior to upgrade
- Purge or scrub historical execution records that contain plaintext header credentials
- Review user permissions and remove execution data access from accounts that do not require it
Patch Information
The issue is fixed in n8n 1.123.64. Upgrading applies the corrected serializer that masks custom HTTP header credentials in LLM sub-node execution data. See the GitHub Security Advisory for release notes and upgrade guidance.
Workarounds
- Configure LLM sub-nodes to use n8n's built-in credential objects instead of passing secrets through custom HTTP headers
- Restrict the workflow:read and execution access scopes so only trusted operators can view or export execution data
- Reduce execution data retention using EXECUTIONS_DATA_MAX_AGE and disable saving of successful executions where feasible
- Store LLM secrets in an external vault and inject them at runtime rather than embedding them in workflow definitions
# Configuration example: limit execution data retention and disable saving where possible
export EXECUTIONS_DATA_SAVE_ON_SUCCESS=none
export EXECUTIONS_DATA_SAVE_ON_ERROR=none
export EXECUTIONS_DATA_SAVE_MANUAL_EXECUTIONS=false
export EXECUTIONS_DATA_PRUNE=true
export EXECUTIONS_DATA_MAX_AGE=24
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

