Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-21877: CWE-94: Improper Control of Generation of Code ('Code Injection') in n8n-io n8n

0
Critical
VulnerabilityCVE-2026-21877cvecve-2026-21877cwe-94cwe-434
Published: Thu Jan 08 2026 (01/08/2026, 00:39:58 UTC)
Source: CVE Database V5
Vendor/Project: n8n-io
Product: n8n

Description

n8n is an open source workflow automation platform. In versions 0.121.2 and below, an authenticated attacker may be able to execute malicious code using the n8n service. This could result in full compromise and can impact both self-hosted and n8n Cloud instances. This issue is fixed in version 1.121.3. Administrators can reduce exposure by disabling the Git node and limiting access for untrusted users, but upgrading to the latest version is recommended.

AI-Powered Analysis

AILast updated: 01/08/2026, 02:06:05 UTC

Technical Analysis

CVE-2026-21877 is a critical vulnerability identified in the open-source workflow automation platform n8n, specifically affecting versions 0.121.2 and earlier. The root cause is an improper control of code generation (CWE-94), which allows an authenticated attacker to inject and execute arbitrary code within the n8n service environment. This vulnerability can be exploited remotely without user interaction, provided the attacker has valid authentication credentials. The attack surface includes both self-hosted deployments and n8n Cloud instances, making it broadly impactful. The exploitation can lead to full system compromise, including unauthorized data access, modification, and disruption of service availability. The vulnerability is linked to the improper handling of the Git node functionality, which can be leveraged to execute malicious payloads. Although no known exploits are currently reported in the wild, the critical CVSS score of 10 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H) indicates that the vulnerability is easy to exploit and has a severe impact on confidentiality, integrity, and availability. The vendor has addressed this issue in version 1.121.3. Until upgrading, administrators are advised to disable the Git node and restrict access to trusted users to reduce exposure.

Potential Impact

For European organizations, this vulnerability poses a significant risk due to the widespread adoption of automation platforms like n8n in various sectors including finance, manufacturing, and public services. Successful exploitation could lead to full compromise of workflow automation systems, resulting in unauthorized data access, data manipulation, and disruption of critical business processes. This can cause operational downtime, financial losses, regulatory non-compliance (e.g., GDPR violations), and reputational damage. Cloud-based n8n instances used by European companies are equally vulnerable, potentially exposing multi-tenant environments to cross-tenant attacks. The ease of exploitation combined with the critical impact on core system functions elevates the threat level, especially for organizations with insufficient access controls or outdated software versions.

Mitigation Recommendations

1. Immediate upgrade to n8n version 1.121.3 or later to apply the official patch addressing the vulnerability. 2. Disable the Git node functionality if upgrading is not immediately possible, as it is a key vector for exploitation. 3. Implement strict access controls by limiting n8n user accounts to trusted personnel only, enforcing strong authentication mechanisms such as MFA. 4. Monitor and audit n8n logs for unusual activity indicative of attempted code injection or unauthorized access. 5. Network segmentation to isolate n8n instances from critical infrastructure and sensitive data stores. 6. Employ runtime application self-protection (RASP) or web application firewalls (WAF) with custom rules to detect and block suspicious payloads targeting code injection. 7. Regularly review and update workflow configurations to minimize exposure to untrusted inputs. 8. Conduct security awareness training for administrators and users managing n8n environments.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-01-05T17:24:36.928Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 695f0dafe471bcf030f5212d

Added to database: 1/8/2026, 1:51:43 AM

Last enriched: 1/8/2026, 2:06:05 AM

Last updated: 1/9/2026, 2:19:15 AM

Views: 34

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats