CVE-2026-33749 Overview
CVE-2026-33749 is a Cross-Site Scripting (XSS) vulnerability in n8n, an open source workflow automation platform. The vulnerability exists in how the /rest/binary-data endpoint handles HTML binary data objects that lack a filename. When an authenticated user with workflow creation or modification permissions crafts a malicious workflow producing such an object, the endpoint serves the response inline without proper Content-Disposition or Content-Security-Policy headers. This allows arbitrary HTML to render in the victim's browser with full same-origin JavaScript access.
Critical Impact
Attackers can execute JavaScript in authenticated user sessions, enabling exfiltration of workflows and credentials, modification of workflows, or privilege escalation to admin.
Affected Products
- n8n versions prior to 1.123.27
- n8n versions prior to 2.13.3
- n8n versions prior to 2.14.1
Discovery Timeline
- 2026-03-25 - CVE CVE-2026-33749 published to NVD
- 2026-03-26 - Last updated in NVD database
Technical Details for CVE-2026-33749
Vulnerability Analysis
This vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation), commonly known as Cross-Site Scripting. The flaw stems from inadequate security controls in the binary data handling mechanism of the n8n platform.
The vulnerability requires an authenticated user with workflow creation or editing privileges to craft a specially designed workflow. This workflow must produce an HTML binary data object that intentionally omits the filename parameter. When such a binary object is requested through the /rest/binary-data endpoint, the server fails to include protective HTTP headers that would prevent inline rendering.
The attack chain involves social engineering, as the attacker must convince a higher-privileged user (such as an administrator) to visit the malicious URL. Once the victim accesses the crafted URL in their authenticated session, the embedded JavaScript executes with full same-origin privileges, granting the attacker access to session tokens, sensitive workflow data, stored credentials, and administrative functions.
Root Cause
The root cause of this vulnerability lies in the insufficient output encoding and missing security headers in the /rest/binary-data endpoint. Specifically, when binary data is returned without a filename, the server fails to set the Content-Disposition header to force a download and omits the Content-Security-Policy header that would restrict script execution. This combination allows user-controlled HTML content to execute JavaScript within the n8n application's security context.
Attack Vector
The attack leverages the network-accessible /rest/binary-data endpoint and requires low privileges (authenticated user with workflow permissions) combined with user interaction from a victim. An attacker creates a malicious workflow that generates HTML content with embedded JavaScript as binary data, then shares the resulting URL with a privileged user. When accessed, the browser renders the HTML inline on the n8n origin, executing the malicious script with the victim's session context.
The vulnerability mechanism involves crafting a workflow that outputs HTML binary data without specifying a filename. When the binary data URL is accessed, the server responds with content-type headers indicating HTML but without security headers to prevent inline execution. The browser then renders the content as a same-origin page, allowing JavaScript to access cookies, make authenticated API calls, and manipulate the DOM within the n8n application context. For detailed technical information, refer to the GitHub Security Advisory.
Detection Methods for CVE-2026-33749
Indicators of Compromise
- Unusual workflow modifications or creations containing binary data nodes outputting HTML content without filenames
- Requests to /rest/binary-data endpoints from unexpected IP addresses or user agents
- Workflow sharing or URL distribution patterns targeting administrative users
- Session activity anomalies following access to binary data URLs
Detection Strategies
- Monitor HTTP responses from /rest/binary-data endpoints for missing Content-Disposition and Content-Security-Policy headers
- Implement logging and alerting for workflow creation or modification activities, particularly those involving binary data nodes
- Review audit logs for workflow access patterns that may indicate credential harvesting or privilege escalation attempts
- Deploy web application firewalls (WAF) with rules to detect XSS payloads in binary data requests
Monitoring Recommendations
- Enable comprehensive logging for all workflow creation, modification, and execution events
- Monitor for unusual API calls made by high-privilege accounts following binary data URL access
- Track and alert on bulk credential access or workflow export operations
- Implement session monitoring to detect anomalous behavior patterns following potential XSS exploitation
How to Mitigate CVE-2026-33749
Immediate Actions Required
- Upgrade n8n to version 1.123.27, 2.13.3, or 2.14.1 or later immediately
- Review workflow creation and editing permissions to ensure only fully trusted users have these capabilities
- Audit existing workflows for suspicious binary data generation patterns
- Restrict network access to the n8n instance to prevent untrusted users from accessing binary data URLs
Patch Information
The n8n development team has released security patches in versions 1.123.27, 2.13.3, and 2.14.1. Users should upgrade to one of these versions or later to fully remediate the vulnerability. The patches address the missing security headers on the /rest/binary-data endpoint, ensuring proper Content-Disposition and Content-Security-Policy headers are set to prevent inline HTML rendering. For additional details, see the GitHub Security Advisory.
Workarounds
- Limit workflow creation and editing permissions to fully trusted users only until patching is complete
- Restrict network access to the n8n instance using firewall rules or network segmentation
- Implement reverse proxy rules to add security headers to /rest/binary-data responses as a temporary measure
- Consider temporarily disabling workflow sharing features if feasible for your environment
# Example nginx configuration to add security headers as a temporary workaround
location /rest/binary-data {
add_header Content-Security-Policy "default-src 'none'; script-src 'none'" always;
add_header Content-Disposition "attachment" always;
proxy_pass http://n8n-backend;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

