# CVE-2026-118678: n8n prototype pollution in workflow history compaction

Source: https://junglewise.ai/threats/cve-2026-118678-n8n-before-2-41-4-and-2-42-x-before-2-42-1-contains-a-prototype  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-28. Updated: 2026-10-28  
License: CC BY 4.0 with a link back

CVE-2026-118678 · Severity: high · CVSS 7.1 · Published 2026-10-28

n8n is a workflow automation platform that allows users to connect and chain applications. A low-privileged user can inject specially crafted workflow connections containing reserved JavaScript property names (like __proto__) that corrupt the application's internal object structure when the history compaction task runs, causing the service to fail logins and data writes. This results in a denial of service affecting all users of the affected instance.

Technologies: [N8n](https://junglewise.ai/threats/technologies/n8n). Vendors: [N8n](https://junglewise.ai/threats/vendors/n8n).

## Quick answers

**Is CVE-2026-118678 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-118678 being exploited in the wild.

**How severe is CVE-2026-118678?** High severity, with a CVSS score of 7.1, published 28 October 2026.

**Which products and versions are affected?** N8n before 2.41.4 and 2.42.x before 2.42.1.

**Is there a fix for CVE-2026-118678?** Yes: fixed in n8n 2.41.4, 2.42.1 and later. Until then: Restrict n8n instance access to fully trusted users. Disable workflow history by setting N8N_WORKFLOW_HISTORY_ENABLED=false if not required. Audit existing workflows for nodes with reserved JavaScript property names (__proto__, constructor, prototype) in their connections and remove or rename them. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-118678 attacked?** It is attacked over the network, in a web application.

**Am I affected by CVE-2026-118678?** Check whether you run N8n at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in n8n 2.41.4, 2.42.1 and later

Restrict n8n instance access to fully trusted users. Disable workflow history by setting N8N_WORKFLOW_HISTORY_ENABLED=false if not required. Audit existing workflows for nodes with reserved JavaScript property names (__proto__, constructor, prototype) in their connections and remove or rename them.

## Technical details

A prototype pollution vulnerability exists in n8n's workflow history compaction routine, which diffs connection objects without sanitizing key names. An authenticated user with low privileges can save a workflow with connections bearing reserved property names; when the periodic compaction task processes these, it pollutes the JavaScript prototype chain. The attack requires network access and valid (low-privilege) credentials, and impacts availability and integrity but not confidentiality.

## Affected products

- n8n n8n before 2.41.4 and 2.42.x before 2.42.1

## Timeline

- 2026-10-28: advisory
- 2026-10-14: patched

## References

- [https://github.com/n8n-io/n8n/security/advisories/GHSA-fvv4-gmv9-xqf5](https://github.com/n8n-io/n8n/security/advisories/GHSA-fvv4-gmv9-xqf5)
- [https://www.vulncheck.com/advisories/n8n-before-2.41.4-and-2.42.1-prototype-pollution-dos-via-workflow-history-compaction](https://www.vulncheck.com/advisories/n8n-before-2.41.4-and-2.42.1-prototype-pollution-dos-via-workflow-history-compaction)

## Related threats

- [n8n path traversal in Databricks node](https://junglewise.ai/threats/cve-2026-119557-n8n-from-2-14-0-through-2-46-3-contains-a-path-traversal)
- [n8n remote code execution in deprecated Function nodes](https://junglewise.ai/threats/cve-2026-119408-n8n-before-2-42-6-2-43-x-before-2-43-3-and-3-x-before-3-0-1)
- [n8n Slack Trigger SSRF and token exfiltration](https://junglewise.ai/threats/cve-2026-118679-n8n-before-1-123-83-2-41-4-and-2-42-1-contains-a-server-side)
- [n8n Local Gateway deep-link missing confirmation re-pairing](https://junglewise.ai/threats/cve-2026-118677-n8n-before-2-41-4-and-2-42-x-before-2-42-1-contains-a-missing)
- [n8n authorization bypass in credential access control](https://junglewise.ai/threats/cve-2026-118676-n8n-before-1-123-85-2-43-5-and-2-44-1-contains-an-authorization)
