Skip to content
All writeups

Patching Legacy Code Nodes in n8n (CVE-2026-119408)

What the n8n upgrade blocks, how to check saved workflows for legacy code nodes, and how to respond to possible credential exposure.

cve-2026-119408n8nremediationincident-response

n8n • cloud • medium

An n8n version check tells you what is running today. It takes a second check to know what an old workflow will do when its next trigger fires. CVE-2026-119408 makes that distinction important for a self-hosted installation.

Where the isolation breaks down

n8n execution isolation boundary
  1. Legacy Function / Function Item
    executes in main n8n process
  2. Migrate to Code Node
    validate two-item fixture shape
  3. External Task Runner
    verify scheduled & webhook runs

The supported Code node can run in a separate task runner. The vendor advisory identifies three older nodes outside that isolation boundary. They are Function, Function Item, and LangChain Code. On affected releases, a signed-in user with workflow editing permissions could get code to execute in the main n8n process. That puts the privileges and secrets available to that process in scope during an investigation. The advisory describes the potential impact. Workflow history and execution records are what help establish the impact on a given deployment. n8n security advisory.

Check what the upgrade covers

The vendor lists fixes in 2.42.6, 2.43.3, 2.44.0, and 3.0.1. Record what the main instance and workers actually run, choose a supported patched release, and check each process again after rollout. A new deployment tag is useful change evidence. The running version is what confirms that the update has reached the process handling the work.

Patched versions reject saves that add or change the affected nodes. Workflows that already contained them can still run. Start the inventory with published workflows because a schedule or webhook can execute one without a new edit. Include unpublished workflows so an old draft does not get missed during a later rollout. For each match, capture the workflow owner, revision, trigger, and the downstream systems it uses. Restrict workflow authoring to trusted users while doing this review.

Rehearse the migration with ordinary input

Verify the database backup and a restore in staging before upgrading production. Move Function logic to Run Once for All Items and Function Item logic to Run Once for Each Item in the supported Code node. For a LangChain workflow, check which supported node can preserve the surrounding inputs and outputs. n8n Code node documentation.

A two-item fixture is enough to catch some migration mistakes. Suppose a per-item step transforms two invoice records. With test credentials and delivery disabled, feed in two distinct synthetic invoices and compare the count, shape, and order of the outputs against the expected result. If the downstream step gets one merged item, the migrated workflow has changed behavior even if the execution is marked successful. For a batch step that is meant to aggregate the invoices, verify the one combined result and also try an empty input.

Use external task runner mode for production isolation and verify each trigger path after cutover: trigger one benign scheduled or webhook run, confirm the execution log identifies the migrated revision and the expected external runner worker, and check the saved-workflow inventory to prove no retired legacy revision still holds an active trigger. A manual test button click alone does not clear scheduled or webhook paths. Record the workflow execution ID and the corresponding runner log entry before marking isolation closed. n8n task runner hardening.

Respond to possible credential exposure

An affected version establishes the need to patch. An unexplained workflow revision, unexpected execution, or other evidence of compromise calls for containment and investigation. Preserve workflow revisions, execution records, and available access logs as you restrict access to the instance. Check downstream service audit logs as well. Use the affected workflows and available records to scope which credentials might have been reachable. Revoke and replace them at the issuing systems, then provision the replacements in a clean, patched deployment.

n8n's Data Encryption Keys control changes the key used for future writes. The two-layer design keeps the instance encryption key in place. Older records remain readable and get re-encrypted when updated. If the instance key may have been exposed, plan recovery on a clean deployment with a new instance key and re-provisioned credentials. Validate the recovery and restore process in staging before making changes to a production key. n8n encryption key rotation.

In the handoff, record the patched versions observed on the main instance and workers, the workflow revisions tested in staging, and the runner evidence for the migrated paths. If incident response was required, include provider-confirmed revocations and any remaining scope questions. A patch can close the path described in the advisory while the credential investigation is still open.

Dedsec Terminal · © 2026 Swaraj Singh