Skip to main content

CVE-2025-68697 — Vulnerability in n8n — CVE Details

HIGH

Self-hosted n8n has Legacy Code node that enables arbitrary file read/write

Published December 26, 2025Updated December 31, 2025Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.35%). Schedule for your next planned update.

Does your project use an affected n8n version?

Paste your package-lock.json to check it for CVE-2025-68697 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my package-lock.json

Summary

Impact

In self-hosted n8n instances where the Code node runs in legacy (non-task-runner) JavaScript execution mode, authenticated users with workflow editing access can invoke internal helper functions from within the Code node.

This allows a workflow editor to perform actions on the n8n host with the same privileges as the n8n process, including:

  • Reading files from the host filesystem (subject to any file-access restrictions configured on the instance and OS/container permissions)
  • Writing files to the host filesystem (subject to the same restrictions)

Starting with n8n version 1.2.1, access to files in the n8n home directory (.n8n) is blocked by default. However, this does not restrict access to other parts of the filesystem unless additional file access limitations are configured.

Patches

  • Upgrade to n8n version 2.0.0 or later, where task runners are enabled by default for Code node execution.
  • On n8n version 1.71.0 and above, enable task runners by setting N8N_RUNNERS_ENABLED=true.

Workarounds

If you cannot immediately migrate to task runners:

  • Limit file operations by setting N8N_RESTRICT_FILE_ACCESS_TO to a dedicated directory (e.g., ~/.n8n-files) and ensure it contains no sensitive data.
  • Keep N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES=true (default) to block access to .n8n and user-defined config files.
  • If workflow editors are not fully trusted, consider disabling high-risk nodes (including the Code node) using NODES_EXCLUDE.

Resources

Advisory Timeline

  • First published December 26, 2025 (335 days ago).
  • Last revised December 31, 2025 — 4 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update n8n to 2.0.0 or later
npm install n8n@2.0.0

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageFixed In
n8n npm · Affected: All versions2.0.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N

Frequently Asked Questions

What is CVE-2025-68697?
Self-hosted n8n has Legacy Code node that enables arbitrary file read/write. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.1/10).
How do I check if my project is affected by CVE-2025-68697?
CVE-2025-68697 affects n8n. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-68697 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.1

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.35%
EPSS percentile: 21.5

This is a below-median EPSS score — only 21.5% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-j4p8-h8mh-rh8q

Related CVEs

  • CVE-2026-33660
    CRITICAL

    n8n has Multiple Remote Code Execution Vulnerabilities in Merge Node AlaSQL SQL Mode

  • CVE-2026-65592
    HIGH

    n8n: Stored DOM XSS via Resource Locator `cachedResultUrl`

  • CVE-2026-86081
    HIGH

    n8n: Regular Expression Denial of Service in the Default Blocked-File-Pattern Match via a Git Node Clone Path

  • CVE-2026-86080
    MEDIUM

    n8n: GitHub Trigger 422 Reuse Path Skips Webhook Secret Storage, Causing Signature Verification to Fail-Open

  • CVE-2026-54310
    MEDIUM

    n8n: SQL Injection in Postgres v1/TimesclaeDB Nodes

  • CVE-2026-72769
    MEDIUM

    n8n: Prototype Pollution via VM Expression Engine Sandbox Escape Leads to Denial of Service

  • CVE-2026-33749
    MEDIUM

    n8n Vulnerable to XSS via Binary Data Inline HTML Rendering

  • CVE-2026-86995
    MEDIUM

    n8n: Git Node branch.<name>.remote Config Key Bypasses Sandbox Path Restriction, Enabling Local Git Repository Read

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json