CVE-2025-65964: N8n Remote Code Execution Vulnerability
CRITICALCVE-2025-65964 is a CRITICAL remote code execution vulnerability (CWE-829: Inclusion of Functionality from Untrusted Control Sphere) affecting N8n libraries in the npm ecosystem. The issue involves n8n vulnerable to remote code execution via git node custom pre-commit hook. Remediation is available by upgrading affected packages to version 1.119.2.
CVE-2025-65964 at a Glance
How to Fix CVE-2025-65964
To remediate this vulnerability, upgrade all affected N8n dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install n8n@1.119.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls n8n
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-65964, inspect your project dependencies using npm:
npm ls n8n
Analyze the terminal output to locate any version of N8n in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.119.2), your application is affected.
Note: The npm ls n8n command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere, where the product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere. In N8n, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-65964 Affected N8n Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
n8n
|
npm |
≥ 0.123.1
< 1.119.2
|
1.119.2
|
References
Frequently Asked Questions
What is CVE-2025-65964?
Which N8n versions are affected?
What version fixes CVE-2025-65964?
Is n8n affected?
What CWE is associated with CVE-2025-65964?
How can I check npm dependencies for CVE-2025-65964?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wpqc-h9wp-chmq",
"modified" : "2025-12-09T16:28:13Z",
"published" : "2025-12-08T21:30:07Z",
"aliases" : [ "CVE-2025-65964" ],
"summary" : "n8n vulnerable to Remote Code Execution via Git Node Custom Pre-Commit Hook",
"details" : "### Impact\n\nThe n8n Git node allows workflows to set arbitrary Git configuration values through the _Add Config_ operation. When an attacker-controlled workflow sets `core.hooksPath` to a directory within the cloned repository containing a Git hook such as `pre-commit`, Git executes that hook during subsequent Git operations. Because Git hooks run as local system commands, this behavior can lead to **arbitrary command execution** on the underlying n8n host.\n\nSuccessful exploitation requires the ability to create or modify an n8n workflow that uses the Git node.\n\nAffected versions: **≥ 0.123.1 and < 1.119.2**\n\n### Patches\n\nThis issue has been patched in **n8n version 1.119.2**.\n\nAll users running affected versions should upgrade to **1.119.2 or later**.\n\n### Workarounds\n\nIf upgrading is not immediately possible, the following mitigations can reduce exposure:\n\n- Exclude the Git node ([Docs](https://n8n-docs.teamlab.info/hosting/securing/blocking-nodes/#exclude-nodes)).\n- Avoid cloning or interacting with untrusted repositories using the Git Node.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "n8n"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.123.1"
}, {
"fixed" : "1.119.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/n8n-io/n8n/security/advisories/GHSA-wpqc-h9wp-chmq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-65964"
}, {
"type" : "WEB",
"url" : "https://github.com/n8n-io/n8n/commit/d5a1171f95f75def5c3ac577707ab913e22aef04"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/n8n-io/n8n"
}, {
"type" : "WEB",
"url" : "https://github.com/n8n-io/n8n/releases/tag/n8n%401.119.2"
}, {
"type" : "WEB",
"url" : "https://n8n-docs.teamlab.info/hosting/securing/blocking-nodes/#exclude-nodes"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-829" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-08T21:30:07Z",
"nvd_published_at" : "2025-12-09T00:15:48Z"
}
}