Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. n8n
  4. ›
  5. CVE-2025-68697

CVE-2025-68697: Self-hosted n8n has Legacy Code node that enables arbitrary file read/write

December 26, 2025 (updated December 31, 2025)

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.

References

  • github.com/advisories/GHSA-j4p8-h8mh-rh8q
  • github.com/n8n-io/n8n
  • github.com/n8n-io/n8n/security/advisories/GHSA-j4p8-h8mh-rh8q
  • nvd.nist.gov/vuln/detail/CVE-2025-68697

Code Behaviors & Features

Detect and mitigate CVE-2025-68697 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.2.1 before 2.0.0

Fixed versions

  • 2.0.0

Solution

Upgrade to version 2.0.0 or above.

Impact 7.1 HIGH

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

Learn more about CVSS

Weakness

  • CWE-269: Improper Privilege Management
  • CWE-749: Exposed Dangerous Method or Function

Source file

npm/n8n/CVE-2025-68697.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 04 Feb 2026 00:36:39 +0000.