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

- Severity: High 7.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 22% of CVEs (2026-12-02)
- Published: 2025-12-26T18:26:38.000Z
- Modified: 2026-10-13T09:10:00.323Z
- Also known as: GHSA-j4p8-h8mh-rh8q
- Weaknesses: CWE-269, CWE-749
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

n8n is an open source workflow automation platform. Prior to version 2.0.0, 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), and writing files to the host filesystem (subject to the same restrictions). This issue has been patched in version 2.0.0. Workarounds for this issue involve limiting file operations by setting N8N_RESTRICT_FILE_ACCESS_TO to a dedicated directory (e.g., ~/.n8n-files) and ensure it contains no sensitive data, keeping N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES=true (default) to block access to .n8n and user-defined config files, and disabling high-risk nodes (including the Code node) using NODES_EXCLUDE if workflow editors are not fully trusted.

(As written by CVE List.)

## Affected

- n8n-io n8n: < 2.0.0
- n8n (npm): from 1.2.1 before 2.0.0
- n8n n8n: before 2.0.0

## Every score

- GitHub_M: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N`
- GitHub: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N`

## References

- <https://github.com/n8n-io/n8n/security/advisories/GHSA-j4p8-h8mh-rh8q> (patch, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-68697> (advisory)
- <https://github.com/n8n-io/n8n> (package)

## Sources

- CVE List: [CVE-2025-68697](https://www.cve.org/CVERecord?id=CVE-2025-68697), CVE Terms of Use, modified 2025-12-26
- GitHub Advisory Database: [GHSA-j4p8-h8mh-rh8q](https://github.com/advisories/GHSA-j4p8-h8mh-rh8q), CC-BY-4.0, modified 2025-12-31
- NVD: [CVE-2025-68697](https://nvd.nist.gov/vuln/detail/CVE-2025-68697), Public domain, modified 2026-10-13

---

Page: https://cve.day/CVE-2025-68697 · Whole record: https://cve.day/CVE-2025-68697.json · Rebuilt by cve.day 2026-11-25T22:59:09.955Z
