CVE-2025-46343: n8n Vulnerable to Stored XSS through Attachments View Endpoint
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
- https://github.com/n8n-io/n8n/security/advisories/GHSA-c8hm-hr8h-5xjw
- https://github.com/n8n-io/n8n/pull/14350
- https://github.com/n8n-io/n8n/pull/14685
- https://github.com/n8n-io/n8n/releases/tag/n8n%401.90.0
- https://nvd.nist.gov/vuln/detail/CVE-2025-46343
- https://github.com/advisories/GHSA-c8hm-hr8h-5xjw
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 entriesCVE-2026-86073
n8n: Per-Resource OAuth Consent Bypass via Unbound Refresh Token Resource Substitution
medium5.9Sep 10, 2026CVE-2026-86074
n8n: Instance AI Credential Setup Accepts Unvalidated Probe URL from Fetched Content
medium5.9Sep 10, 2026CVE-2026-86075
n8n: Unauthenticated Persistent Storage Exhaustion via OAuth Dynamic Client Registration Endpoint
high8.7Sep 10, 2026CVE-2026-86076
n8n: Expression Sandbox Escape via Class-Field Sanitizer Rebinding Can Lead to Code Execution
high8.7Sep 10, 2026CVE-2026-86077
n8n: Anonymous Approval-Gate Bypass via Reused resumeToken over the Chat WebSocket
medium6.3Sep 10, 2026CVE-2026-86078
n8n: Prototype Pollution via Workflow Structure Summary Can Lead to Denial of Service
medium6.0Sep 10, 2026
