CVE-2026-103259 in n8n
Summary
by MITRE • 10/01/2026
n8n versions before 2.39.6 and 2.40.0 before 2.40.1 contain a session token leakage vulnerability in the Dynamic Credentials authorize and revoke endpoints. Attackers with resolver registration capability can capture collaborators' session tokens by setting a fallback resolver to an attacker-controlled endpoint during the account connection flow, enabling unauthorized credential access.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Analysis
by VulDB Data Team • 10/01/2026
The n8n automation platform, prior to versions 2.39.6 and 2.40.1, contains a critical security flaw within its Dynamic Credentials system that allows for the leakage of sensitive session tokens. This vulnerability specifically affects the authorize and revoke endpoints used during the account connection flow when integrating with third-party services. The core issue stems from how n8n handles resolver configurations in scenarios where standard authentication flows encounter errors or require fallback mechanisms. An attacker who possesses the capability to register as a resolver, which is often possible through open registration policies or misconfigured trust settings within the automation workflow environment, can manipulate this process. By setting their own endpoint as a fallback resolver during the connection setup for another user's account, the attacker intercepts sensitive authentication data that should remain confidential between the n8n instance and the legitimate service provider.
From a technical perspective, the flaw lies in the improper validation of redirect URIs or callback endpoints when handling OAuth2 or similar token-based authentication flows. When an administrator or user attempts to connect their account to a supported integration, n8n initiates a request to the third-party identity provider. If this process fails or requires alternative resolution methods, the system may fall back to a configured resolver endpoint. Because the platform does not sufficiently restrict which endpoints can be utilized as fallback resolvers for sensitive credential operations, an attacker-controlled server positioned in this chain receives the full session token and associated authentication parameters intended for the legitimate service. This constitutes a classic case of insecure direct object reference combined with improper validation of user-supplied input regarding callback destinations. The vulnerability aligns closely with CWE-209, which describes the generation of error messages containing sensitive information that could be exploited by attackers, as well as CWE-613 concerning insufficient session expiration or management in specific contexts where tokens are exposed via side channels like misconfigured redirects.
The operational impact of this vulnerability is severe for organizations relying on n8n to automate workflows involving third-party APIs and services. Session tokens serve as the primary mechanism for maintaining authenticated sessions with external platforms such as Google, Slack, Salesforce, or GitHub. Once an attacker captures these tokens through the resolver manipulation technique described above, they gain unauthorized access to the victim's account within those integrated services. This can lead to a wide range of malicious activities including data exfiltration, where sensitive business information stored in connected applications is stolen; privilege escalation, allowing the attacker to perform actions on behalf of the compromised user with full administrative rights if available; and lateral movement across other systems that trust the same identity provider or share credentials. In an enterprise environment, this could result in significant financial loss, regulatory non-compliance due to data breaches involving personally identifiable information or protected health information, and reputational damage stemming from a perceived lack of security hygiene in automation infrastructure.
Mitigation strategies must focus on immediate patching and architectural hardening. The primary remediation is to upgrade n8n to version 2.39.6 or later for the stable branch, or version 2.40.1 and above for the newer release line, as these versions address the resolver validation logic to prevent unauthorized endpoints from intercepting authentication flows. For organizations unable to patch immediately due to operational constraints, it is crucial to review and restrict who can register resolvers within the n8n instance. Implementing strict access controls that limit resolver registration capabilities to trusted internal services only will reduce the attack surface significantly. Additionally, administrators should audit existing workflows for any custom integrations or webhook configurations that might inadvertently expose sensitive endpoints. Monitoring logs for unusual patterns in authentication requests and implementing token rotation policies can also help mitigate the risk of long-term exposure if a breach were to occur. This vulnerability is categorized under MITRE ATT&CK technique T1528, which involves stealing application access tokens through phishing or social engineering vectors that exploit trust relationships within software ecosystems.