Security researchers at Cyera Research Labs disclosed CVE-2026-21858, a critical vulnerability in n8n that allows unauthenticated attackers to take complete control of workflow automation servers. Codenamed “Ni8mare”, the flaw carries the maximum CVSS score of 10.0 and affects an estimated 100,000 servers globally.

Vulnerability overview

FieldValue
CVECVE-2026-21858
CodenameNi8mare
CVSS10.0 (Critical)
TypeContent-Type Confusion → Arbitrary File Read → RCE
Affected Versionsn8n ≤ 1.65.0
Fixed Version1.121.0 (November 18, 2025)
DiscoveryDor Attias, Cyera Research Labs
ReportedNovember 9, 2025
Public disclosureJanuary 7, 2026

Technical analysis

The vulnerability exploits a Content-Type confusion flaw in how n8n handles file uploads to Form Webhooks:

Vulnerability mechanism

StepAction
1File-handling function runs without verifying Content-Type is multipart/form-data
2Attacker can override req.body.files with malicious input
3File copy function called without content-type verification
4Attacker controls filepath parameter
5Any local file can be copied instead of uploaded file
6Primary primitive achieved: arbitrary file read

Content-Type confusion detail

n8n uses two functions to process incoming webhook data based on the Content-Type header:

Content-TypeHandlerBehavior
multipart/form-dataUpload parserSaves files to random temporary locations
application/jsonJSON parserProcesses as structured data

The vulnerability exists because the file copy function doesn’t verify the Content-Type matches the expected multipart/form-data. By sending a request with application/json Content-Type but including file parameters, an attacker controls the entire req.body.files object—including the filepath parameter.

As Cyera explained: “Since this function is called without verifying the content type is multipart/form-data, we control the entire req.body.files object. That means we control the filepath parameter – so instead of copying an uploaded file, we can copy any local file from the system.”

Escalation to RCE

In n8n’s context, arbitrary file read escalates to full remote code execution:

PhaseAction
1Read n8n configuration files
2Extract stored credentials and secrets
3Read database files containing session data
4Forge administrator JWT token
5Use CVE-2025-68613 for expression injection
6Bypass sandbox for command execution
7Full server compromise achieved

No credentials are required. The attack works against default n8n installations with publicly accessible Form Webhooks.

Exploitation prerequisites

While rated Critical by CVSS, successful exploitation requires specific conditions:

PrerequisiteDetails
Form Webhook workflowMust be created and active
Public accessibilityWebhook must be reachable without authentication
Vulnerable versionn8n ≤ 1.65.0

Horizon3.ai notes that these pre-requisites may limit widespread exploitability in real-world deployments. However, organizations should not rely on configuration to protect against a CVSS 10.0 vulnerability.

What attackers gain

Successful exploitation provides:

CapabilityImpact
Arbitrary file readAccess to secrets, configurations, workflow data
Authentication bypassFull administrative access via forged JWT
Command executionComplete server compromise
Credential theftAccess to all integrated services
Lateral movementPivot to connected systems

Why n8n is a high-value target

“The risk is massive. n8n sits at the heart of enterprise automation infrastructure. Gaining control of n8n means gaining access to your secrets, customer data, CI/CD pipelines and more.” — Dor Attias, Cyera Research Labs

Typical n8n credential storage

Credential typeRisk if compromised
API keysAccess to integrated services
OAuth tokensCloud platform access
Database credentialsConnected data sources
Cloud storage keysS3, GCS, Azure Blob access
CI/CD secretsDeployment pipeline compromise
Business dataCustomer and operational data

A compromised n8n server provides attackers with access to every system the automation platform touches.

Affected deployments

n8n is widely used for:

Use caseRisk
Business process automationOperational data exposure
Data integrationMulti-system credential theft
CI/CD orchestrationSupply chain compromise
Monitoring and alertingSecurity visibility loss
API integrationsThird-party service access

Self-hosted vulnerability factors

FactorRisk
Manual updates requiredPatching delays
Public webhook endpointsDirect attack surface
Default configurationsMay lack authentication
Credential storageLocal secrets accessible

Cyera estimates approximately 100,000 servers are potentially affected globally.

Timeline

DateEvent
November 9, 2025Vulnerability reported to n8n
November 18, 2025Patch released in version 1.121.0
January 7, 2026Public disclosure by Cyera
January 6, 2026n8n assigns CVE-2026-21858
January 7, 2026Cyera publishes disclosure
January 2026Public PoC exploit available (Chocapikk/GitHub)

Remediation

Immediate action required

PriorityAction
CriticalUpgrade to n8n 1.121.0 or later
CriticalNo workarounds available
HighAudit workflow logs for suspicious activity
HighRotate all stored credentials
HighReview connected systems for unauthorized access

Defense in depth

ControlPurpose
Network restrictionsLimit access to n8n instances
Disable public webhooksReduce attack surface if not needed
Authentication enforcementDon’t run n8n without auth
Secrets managementUse external vaults (HashiCorp Vault, AWS Secrets Manager)
MonitoringAlert on unusual workflow executions
Network segmentationIsolate n8n from sensitive systems

Detection

Indicators to monitor

IndicatorMeaning
Unexpected file access patternsPossible exploitation
Authentication anomaliesSession forgery attempts
New or modified workflowsUnauthorized changes
Unusual API calls from n8n serverLateral movement
Credential usage from unexpected sourcesStolen credential abuse

Log review

Log sourceSearch for
n8n application logsUnusual webhook activity
Web server logsForm Webhook requests with suspicious content
System logsUnexpected file access
Network logsOutbound connections from n8n

Recommendations

For n8n administrators

PriorityAction
CriticalPatch immediately to 1.121.0+
CriticalAudit all stored credentials
HighReview webhook configurations
HighImplement network-level access controls
MediumConsider migration to n8n Cloud for managed security
OngoingEstablish regular update schedule

For security teams

PriorityAction
CriticalInventory all n8n deployments
HighVerify patch status across all instances
HighHunt for compromise indicators
HighAssess connected system exposure
MediumReview n8n access patterns
OngoingInclude n8n in vulnerability management

CVE-2026-21858 is part of a series of n8n security issues in 2026:

CVETypeCVSSAuth required
CVE-2026-21858Content-Type confusion → RCE10.0No
CVE-2026-1470JavaScript sandbox escape9.9Yes
CVE-2026-0863Python sandbox escape8.5Yes

Organizations should ensure all three vulnerabilities are addressed.

Context

Workflow automation platforms like n8n, Zapier, and Make occupy a privileged position in enterprise infrastructure—they connect systems, store credentials, and automate sensitive operations. A vulnerability in these platforms doesn’t just compromise one system; it potentially compromises every system the platform integrates with.

Organizations running n8n should treat CVE-2026-21858 as an emergency. The combination of maximum severity, no authentication requirement, and widespread deployment makes this a priority-one patch. The two-month gap between patch release (November 2025) and public disclosure (January 2026) provided ample patching window—organizations still running vulnerable versions should assume potential compromise.

Public exploit availability

A proof-of-concept exploit is publicly available on GitHub (Chocapikk/CVE-2026-21858), significantly increasing the risk to unpatched instances:

FactorStatus
PoC availableYes (GitHub)
Weaponization difficultyLow
Automation potentialHigh
Mass scanningLikely

The existence of a public PoC means that even unsophisticated attackers can now exploit vulnerable n8n instances.

Mitigation options

Since no workarounds exist, organizations have limited options:

OptionEffectiveness
Upgrade to 1.121.0+Complete remediation
Disable public webhooksReduces attack surface
Network restrictionsLimits who can reach webhooks
Web application firewallMay block some exploitation attempts
Take offlineEliminates risk but disrupts operations

The only complete remediation is upgrading to version 1.121.0 or later.