Free AI Safety Workshop — in collaboration with explainx.aiSave your seat
AgentbeamBeta
AI agent vulnerability · n8n

CVE-2025-46343: n8n Vulnerable to Stored XSS through Attachments View Endpoint

mediumCVSS 3.1 5.0GHSA-c8hm-hr8h-5xjw

Impact n8n workflows can store and serve binary files, which are accessible to authenticated users. However, there was no restriction on the MIME type of uploaded files, and the MIME type could be controlled via a GET parameter. This allowed the server to respond with any MIME type, potentially enabling malicious content to be interpreted and executed by the browser.

Published Apr 28, 2025 · Updated Apr 29, 2025

Affected packages

n8n

Ecosystem
npm
Affected
< 1.90.0
Fixed in
1.90.0
Check
npm ls n8n

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Impact

n8n workflows can store and serve binary files, which are accessible to authenticated users. However, there was no restriction on the MIME type of uploaded files, and the MIME type could be controlled via a GET parameter. This allowed 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, for example, send a request to change the user’s email address in their account settings, effectively enabling account takeover.

Patches

Credit

We would like to thank @Mahmoud0x00 for reporting this issue.

Credited to Mahmoud0x00.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More n8n vulnerabilities

All n8n entries