CVE-2025-46343
JSON

5.0medium

n8n Vulnerable to Stored XSS through Attachments View Endpoint

Severity
5.0medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.27% (higher than 21% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-c8hm-hr8h-5xjw

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.

Affected

Product or packageVersionsReported by
n8n-io n8n< 1.90.0CVE List
n8n (npm)before 1.90.0GitHub Advisory Database
n8n n8nbefore 1.90.0NVD

All scores

GitHub_M5.0medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N
GitHub5.0medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N
NVD5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
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.

NVD (es)

n8n es una plataforma de automatización de flujos de trabajo. Antes de la versión 1.90.0, n8n era vulnerable a ataques de Cross-Site Scripting (XSS) almacenado a través del endpoint de vista de adjuntos. Los flujos de trabajo de n8n pueden almacenar y servir archivos binarios, accesibles para usuarios autenticados. Sin embargo, no hay restricción en el tipo MIME de los archivos subidos, y este se puede controlar mediante un parámetro GET. Esto permite al servidor responder con cualquier tipo MIME, lo que podría permitir que el navegador interprete y ejecute contenido malicioso. Un atacante autenticado con permisos de miembro podría explotar esto subiendo un archivo HTML manipulado con JavaScript malicioso. Cuando otro usuario visita el endpoint de datos binarios con el tipo MIME establecido en text/html, el script se ejecuta en el contexto de la sesión del usuario. Este script podría enviar una solicitud para cambiar la dirección de correo electrónico del usuario en la configuración de su cuenta, lo que permite el robo de la cuenta. Este problema se ha corregido en la versión 1.90.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-46343 changed 2025-04-29CVE Terms of Use
GitHub Advisory DatabaseGHSA-c8hm-hr8h-5xjw changed 2025-04-29CC-BY-4.0
NVDCVE-2025-46343 changed 2026-06-17Public domain