/

CVE-2026-77075

Severity:

HIGH RISK

(7.3)

Expression Injection (CWE-94) in n8n Link Preview UI

CVE-2026-77075

Analyzed

Vulnerability type

Category:

Expression Injection

CWE:

CWE-94

Impact:

Cross-user script execution and potential authenticated-session compromise

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

An expression injection vulnerability in n8n link preview rendering allows a stored field value to be interpreted as JavaScript when another user opens an affected node in the editor. An authenticated member may exploit this behavior to execute script in a victim's authenticated session, depending on the victim's access and the rendered node context.

Affected context

The vulnerability occurs in n8n editor rendering for resource-locator fields that generate link previews from stored values. It becomes risky when the field value is controlled by an authenticated member and is inserted directly into a node type's URL template without recognizing or neutralizing expression syntax before the preview is rendered.

Exploit preconditions

  • Attack surface: n8n editor link preview rendering for resource-locator fields
  • Required access: Authenticated member access sufficient to store or modify an affected field value
  • Trigger point: Another authenticated user opens the affected node in the editor
  • Why exploitation is possible: The stored value is incorporated into a URL template without adequate expression-syntax handling, allowing injected expressions to be evaluated in the victim's session

Why this happens

The underlying flaw is insufficient separation between user-controlled data and executable expression syntax. The editor directly splices a stored resource-locator value into a node-specific URL template, allowing expression markers within that value to be interpreted during rendering. This behavior maps to CWE-94: Improper Control of Generation of Code, because data supplied through a field can influence code-like evaluation rather than remaining inert content.

Potential impact

  • An attacker may execute JavaScript in another user's authenticated editor session
  • A victim's accessible data or actions could be exposed or misused
  • An attacker could perform unauthorized operations available to the victim
  • Session-associated information could be accessed, depending on browser and application controls
  • Additional users or workflows could be targeted through shared or commonly opened nodes

General mitigation guidance

Mitigation generally focuses on preserving a strict boundary between stored values, URL templates, and executable expressions.

Common defensive patterns include:

  • Treating resource-locator values as inert data during preview generation
  • Avoiding direct interpolation of user-controlled values into expression-bearing templates
  • Using context-aware escaping and narrowly scoped URL construction APIs
  • Applying explicit allowlists for supported URL schemes and template components
  • Separating preview rendering from privileged workflow or editor operations
  • Limiting editor and workflow privileges according to user roles
  • Requiring revalidation when stored values are rendered in a different security context

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules that identify user-controlled values concatenated with executable templates
  • Code review checks for dynamic expression evaluation in rendering or preview paths
  • Tests containing expression markers and special characters in resource-locator fields
  • Browser security monitoring for unexpected script execution during editor navigation
  • Policy enforcement requiring context-aware escaping and approved URL-construction utilities
  • Automated code review tools that flag data-to-code flows across authentication boundaries

Sources

SourceLink
github.comgithub.com/n8n-io/n8n/security/advisories/GHSA-fh4c-9rr2-p7qc
vulncheck.comvulncheck.com/advisories/n8n-before-expression-injection-via-resource-locator

Frequently asked

questions

It may be exploitable through the n8n application by an authenticated member who can store a crafted value, provided another user later opens the affected node in the editor.

No. The attacker generally needs their own authenticated member account and the ability to modify a relevant resource-locator field. The victim must open the affected node while authenticated.

Keep stored field values inert, prevent them from being interpreted as expressions during preview rendering, and use context-aware escaping or narrowly constrained URL construction.

Review all data-to-code boundaries, test rendering paths with expression-like input, enforce role-based access controls, and apply security checks to cross-user editor features.

Find out what's already
exploitable in your codebase.