High severityNVD Advisory· Published Feb 4, 2026· Updated Feb 5, 2026
n8n Unsafe Buffer Allocation Allows In-Process Memory Disclosure in Task Runner
CVE-2025-61917
Description
n8n is an open source workflow automation platform. From version 1.65.0 to before 1.114.3, the use of Buffer.allocUnsafe() and Buffer.allocUnsafeSlow() in the task runner allowed untrusted code to allocate uninitialized memory. Such uninitialized buffers could contain residual data from within the same Node.js process (for example, data from prior requests, tasks, secrets, or tokens), resulting in potential information disclosure. This issue has been patched in version 1.114.3.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
n8nnpm | >= 1.65.0, < 1.114.3 | 1.114.3 |
Affected products
1Patches
12 files changed · +31 −1
packages/@n8n/task-runner/src/js-task-runner/js-task-runner.ts+11 −1 modified@@ -211,9 +211,19 @@ export class JsTaskRunner extends TaskRunner { } private getNativeVariables() { + const { mode } = this; return { // Exposed Node.js globals - Buffer, + Buffer: new Proxy(Buffer, { + get(target, prop) { + if (mode === 'insecure') return target[prop as keyof typeof Buffer]; + if (prop === 'allocUnsafe' || prop === 'allocUnsafeSlow') { + // eslint-disable-next-line @typescript-eslint/unbound-method + return Buffer.alloc; + } + return target[prop as keyof typeof Buffer]; + }, + }), setTimeout, setInterval, setImmediate,
packages/@n8n/task-runner/src/js-task-runner/__tests__/js-task-runner.test.ts+20 −0 modified@@ -131,6 +131,26 @@ describe('JsTaskRunner', () => { }); }; + describe('Buffer security', () => { + it('should redirect Buffer.allocUnsafe to Buffer.alloc', async () => { + const outcome = await executeForAllItems({ + code: 'const buf = Buffer.allocUnsafe(10); return [{ json: { allZeros: buf.every(b => b === 0) } }]', + inputItems: [{ a: 1 }], + }); + + expect(outcome.result).toEqual([wrapIntoJson({ allZeros: true })]); + }); + + it('should redirect Buffer.allocUnsafeSlow to Buffer.alloc', async () => { + const outcome = await executeForAllItems({ + code: 'const buf = Buffer.allocUnsafeSlow(10); return [{ json: { allZeros: buf.every(b => b === 0) } }]', + inputItems: [{ a: 1 }], + }); + + expect(outcome.result).toEqual([wrapIntoJson({ allZeros: true })]); + }); + }); + describe('console', () => { test.each<[CodeExecutionMode]>([['runOnceForAllItems'], ['runOnceForEachItem']])( 'should make an rpc call for console log in %s mode',
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4- github.com/advisories/GHSA-49mx-fj45-q3p6ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-61917ghsaADVISORY
- github.com/n8n-io/n8n/commit/2c4c2953199733c791f739a40879ae31ca129abaghsax_refsource_MISCWEB
- github.com/n8n-io/n8n/security/advisories/GHSA-49mx-fj45-q3p6ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.