The Ni8mare Scenario: Critical n8n Vulnerability Grants Full Server Access
A critical vulnerability has been unearthed within the esteemed workflow automation platform n8n, permitting the illicit seizure of vulnerable instances without the requisite credentials. By dispatching a meticulously crafted request, an adversary can extract sensitive secrets, forge administrative access, and ultimately execute arbitrary commands upon the server.
Formally designated as CVE-2026-21858 with a maximum CVSS score of 10.0, the flaw has been dubbed “Ni8mare” by Cyera Research Labs. According to n8n, the exploit facilitates the unauthorized reading of local server files through the execution of specific form-related workflows. For organizations utilizing these forms to ingest and process data, the risk is particularly acute: an attacker can circumvent the standard upload process, compelling the system to fetch and transmit the contents of any arbitrary file residing on the host’s disk.
Remarkably, this represents the fourth critical security flaw to plague n8n within a mere fortnight, following the disclosure of CVE-2025-68613, CVE-2025-68668 (N8scape), and CVE-2026-21877. Distinguishing itself from its predecessors, CVE-2026-21858 necessitates no authentication and thrives upon a fundamental logic discrepancy regarding the Content-Type header.
Technically, the malaise resides in how n8n parses incoming webhook and form requests. Upon receiving a request, the platform evaluates the Content-Type to select an appropriate handler; while multipart/form-data typically triggers the file upload parser, other types utilize a standard body parser. Cyera researchers identified a precarious scenario wherein the form-submission handler invokes file-processing functions without validating the content type. This oversight allows an attacker to manually construct an object that dictates the file path parameters.
The practical implications are dire: instead of processing a legitimate upload, the system is coerced into duplicating sensitive local files. Any subsequent step in the workflow then treats this stolen data as a conventional user upload. Depending on the specific configuration, an intruder could exfiltrate configuration files, cryptographic keys, authentication tokens, or the entire backend database.
A particularly salient scenario involves a chat interface that relies on specification files uploaded via form-based workflows. An adversary could exploit this flaw to access the n8n database (such as database.sqlite), extract administrative identifiers and password hashes, and retrieve the encryption secret from the configuration. Armed with these, the attacker could forge a session to bypass authentication entirely. Once administrative control is secured, the integration of an “Execute Command” node provides a gateway to Remote Code Execution (RCE).
Cyera emphasizes that n8n frequently serves as a central repository for an organization’s most precious assets, including API keys, OAuth tokens, and credentials for cloud services and internal databases. Consequently, the compromise of a single instance may precipitate the immediate collapse of the broader infrastructure’s security.
This vulnerability affects all iterations of n8n up to and including version 1.65.0, with a definitive resolution provided in version 1.121.0. Users are urged to transition to the patched release immediately. Furthermore, it is advised to avoid exposing n8n instances to the public internet, mandate authentication for all forms, and—should an immediate update be unfeasible—temporarily restrict access to all public webhook and form endpoints.
Support Our Threat Intelligence
If you find our technology report and cybersecurity news helpful, consider supporting our work.