CVE-2025-46343: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in n8n-io n8n
n8n is a workflow automation platform. Prior to version 1.90.0, n8n is vulnerable to stored cross-site scripting (XSS) through the attachments view endpoint. n8n workflows can store and serve binary files, which are accessible to authenticated users. However, there is no restriction on the MIME type of uploaded files, and the MIME type could be controlled via a GET parameter. This allows the server to respond with any MIME type, potentially enabling malicious content to be interpreted and executed by the browser. An authenticated attacker with member-level permissions could exploit this by uploading a crafted HTML file containing malicious JavaScript. When another user visits the binary data endpoint with the MIME type set to text/html, the script executes in the context of the user’s session. This script could send a request to change the user’s email address in their account settings, effectively enabling account takeover. This issue has been patched in version 1.90.0.
AI Analysis
Technical Summary
CVE-2025-46343 is a stored cross-site scripting (XSS) vulnerability affecting versions of the n8n workflow automation platform prior to 1.90.0. n8n allows users to create and manage automated workflows, including the ability to upload and serve binary files through its attachments view endpoint. The vulnerability arises because the application does not properly restrict or sanitize the MIME type of uploaded files. Specifically, the MIME type can be manipulated via a GET parameter, allowing an attacker to force the server to respond with any MIME type, including text/html. An authenticated attacker with member-level permissions can exploit this by uploading a crafted HTML file containing malicious JavaScript code. When another authenticated user accesses the binary data endpoint with the MIME type parameter set to text/html, the malicious script executes in the context of that user's session. This script can perform unauthorized actions such as sending requests to change the victim's email address in their account settings, potentially leading to account takeover. The vulnerability requires authentication and user interaction (visiting the malicious endpoint). It has been assigned a CVSS v3.1 score of 5.0 (medium severity), reflecting the need for authentication and user interaction, but also the high confidentiality impact due to the possibility of account takeover. The issue was patched in n8n version 1.90.0. No known exploits are reported in the wild as of the publication date.
Potential Impact
For European organizations using n8n versions prior to 1.90.0, this vulnerability poses a significant risk to the confidentiality and integrity of user accounts and potentially sensitive workflow data. Since n8n is often used to automate business-critical processes, an attacker exploiting this XSS flaw could hijack user sessions, alter account details, and potentially escalate privileges or disrupt workflows. This could lead to unauthorized access to internal systems, data leakage, or manipulation of automated processes. The requirement for authentication and member-level permissions limits the attack surface to insiders or compromised accounts, but insider threats or phishing attacks could facilitate exploitation. The impact is particularly concerning for organizations handling sensitive personal data or intellectual property, as account takeover could enable further lateral movement or data exfiltration. Additionally, the ability to execute arbitrary JavaScript in user sessions could be leveraged to perform further attacks such as stealing session tokens or deploying additional malware. The medium CVSS score reflects the balance between the attack complexity and the potential damage, but organizations with high-value workflows should treat this vulnerability seriously.
Mitigation Recommendations
1. Upgrade n8n to version 1.90.0 or later immediately to apply the official patch that properly restricts MIME type handling and neutralizes the XSS vulnerability. 2. Implement strict access controls and monitoring for member-level accounts to detect suspicious file uploads or unusual activity. 3. Restrict the types of files that can be uploaded through the attachments endpoint by enforcing server-side MIME type validation and content inspection, rather than relying on client-supplied parameters. 4. Employ Content Security Policy (CSP) headers to limit the execution of inline scripts and reduce the impact of potential XSS attacks. 5. Educate users about the risks of interacting with untrusted links or files within the n8n environment, especially those that could trigger the binary data endpoint with manipulated MIME types. 6. Monitor logs for anomalous GET requests to the attachments endpoint with unusual MIME type parameters. 7. Consider implementing multi-factor authentication (MFA) for all users to reduce the risk of account takeover even if session hijacking occurs. 8. Conduct regular security audits and penetration tests focusing on workflow automation platforms and their file handling components.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Ireland
CVE-2025-46343: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in n8n-io n8n
Description
n8n is a workflow automation platform. Prior to version 1.90.0, n8n is vulnerable to stored cross-site scripting (XSS) through the attachments view endpoint. n8n workflows can store and serve binary files, which are accessible to authenticated users. However, there is no restriction on the MIME type of uploaded files, and the MIME type could be controlled via a GET parameter. This allows the server to respond with any MIME type, potentially enabling malicious content to be interpreted and executed by the browser. An authenticated attacker with member-level permissions could exploit this by uploading a crafted HTML file containing malicious JavaScript. When another user visits the binary data endpoint with the MIME type set to text/html, the script executes in the context of the user’s session. This script could send a request to change the user’s email address in their account settings, effectively enabling account takeover. This issue has been patched in version 1.90.0.
AI-Powered Analysis
Technical Analysis
CVE-2025-46343 is a stored cross-site scripting (XSS) vulnerability affecting versions of the n8n workflow automation platform prior to 1.90.0. n8n allows users to create and manage automated workflows, including the ability to upload and serve binary files through its attachments view endpoint. The vulnerability arises because the application does not properly restrict or sanitize the MIME type of uploaded files. Specifically, the MIME type can be manipulated via a GET parameter, allowing an attacker to force the server to respond with any MIME type, including text/html. An authenticated attacker with member-level permissions can exploit this by uploading a crafted HTML file containing malicious JavaScript code. When another authenticated user accesses the binary data endpoint with the MIME type parameter set to text/html, the malicious script executes in the context of that user's session. This script can perform unauthorized actions such as sending requests to change the victim's email address in their account settings, potentially leading to account takeover. The vulnerability requires authentication and user interaction (visiting the malicious endpoint). It has been assigned a CVSS v3.1 score of 5.0 (medium severity), reflecting the need for authentication and user interaction, but also the high confidentiality impact due to the possibility of account takeover. The issue was patched in n8n version 1.90.0. No known exploits are reported in the wild as of the publication date.
Potential Impact
For European organizations using n8n versions prior to 1.90.0, this vulnerability poses a significant risk to the confidentiality and integrity of user accounts and potentially sensitive workflow data. Since n8n is often used to automate business-critical processes, an attacker exploiting this XSS flaw could hijack user sessions, alter account details, and potentially escalate privileges or disrupt workflows. This could lead to unauthorized access to internal systems, data leakage, or manipulation of automated processes. The requirement for authentication and member-level permissions limits the attack surface to insiders or compromised accounts, but insider threats or phishing attacks could facilitate exploitation. The impact is particularly concerning for organizations handling sensitive personal data or intellectual property, as account takeover could enable further lateral movement or data exfiltration. Additionally, the ability to execute arbitrary JavaScript in user sessions could be leveraged to perform further attacks such as stealing session tokens or deploying additional malware. The medium CVSS score reflects the balance between the attack complexity and the potential damage, but organizations with high-value workflows should treat this vulnerability seriously.
Mitigation Recommendations
1. Upgrade n8n to version 1.90.0 or later immediately to apply the official patch that properly restricts MIME type handling and neutralizes the XSS vulnerability. 2. Implement strict access controls and monitoring for member-level accounts to detect suspicious file uploads or unusual activity. 3. Restrict the types of files that can be uploaded through the attachments endpoint by enforcing server-side MIME type validation and content inspection, rather than relying on client-supplied parameters. 4. Employ Content Security Policy (CSP) headers to limit the execution of inline scripts and reduce the impact of potential XSS attacks. 5. Educate users about the risks of interacting with untrusted links or files within the n8n environment, especially those that could trigger the binary data endpoint with manipulated MIME types. 6. Monitor logs for anomalous GET requests to the attachments endpoint with unusual MIME type parameters. 7. Consider implementing multi-factor authentication (MFA) for all users to reduce the risk of account takeover even if session hijacking occurs. 8. Conduct regular security audits and penetration tests focusing on workflow automation platforms and their file handling components.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-04-22T22:41:54.912Z
- Cisa Enriched
- true
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 682d983dc4522896dcbef0c4
Added to database: 5/21/2025, 9:09:17 AM
Last enriched: 6/24/2025, 11:05:32 PM
Last updated: 8/16/2025, 10:19:16 PM
Views: 28
Related Threats
CVE-2025-9091: Hard-coded Credentials in Tenda AC20
LowCVE-2025-9090: Command Injection in Tenda AC20
MediumCVE-2025-9092: CWE-400 Uncontrolled Resource Consumption in Legion of the Bouncy Castle Inc. Bouncy Castle for Java - BC-FJA 2.1.0
LowCVE-2025-9089: Stack-based Buffer Overflow in Tenda AC20
HighCVE-2025-9088: Stack-based Buffer Overflow in Tenda AC20
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.