/

CVE-2026-77071

Severity:

CRITICAL RISK

(9.8)

PostgREST Filter Injection (CWE-89) in n8n Supabase

CVE-2026-77071

Analyzed

Vulnerability type

Category:

Injection

CWE:

CWE-89

Impact:

Unauthorized database access and bulk data manipulation

Severity:

CRITICAL RISK

(9.8)

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

A critical PostgREST filter injection vulnerability in n8n's Supabase node allows user-controlled filter values to alter the intended database query. When an attacker can influence a vulnerable Row Get Many, Delete, or Update operation, the filter may match every row, enabling broad data disclosure, deletion, or modification.

Affected context

The vulnerability occurs in n8n workflows that use the Supabase node's Row Get Many, Delete, or Update operations and pass attacker-influenced values into PostgREST filters. Risk is higher when workflow inputs, webhook data, form submissions, or other external sources reach these operations without strict validation and parameter-safe query construction.

Exploit preconditions

  • Attack surface: n8n workflows using vulnerable Supabase node row operations
  • Required access: Ability to influence a filter value or trigger a workflow that processes attacker-controlled input
  • Trigger point: Construction and execution of a PostgREST filter query
  • Why exploitation is possible: An expression-bindable value is concatenated without adequate escaping, allowing the intended filter condition to be widened

Why this happens

The underlying bug is a failure to safely separate data values from query expressions. By concatenating an unescaped value into a PostgREST filter, the application allows input intended to represent a row-selection value to affect query logic. This is consistent with CWE-89: Improper Neutralization of Special Elements used in an SQL Command, including injection risks in database query languages and query-like filtering interfaces.

Potential impact

  • Sensitive records may be disclosed beyond the intended row scope
  • An attacker could cause deletion of many or all matching records
  • Unauthorized updates could modify broad sets of database rows
  • Application integrity and downstream workflow results may be compromised
  • Data loss or service disruption could occur

General mitigation guidance

Mitigation generally focuses on preserving a strict separation between filter data and query expressions.

Common defensive patterns include:

  • Constructing PostgREST filters through parameter-safe APIs rather than string concatenation
  • Applying strict allowlists and type validation to workflow inputs
  • Rejecting unexpected operators, delimiters, and expression-like values
  • Limiting workflows to the minimum database operations and columns they require
  • Using database roles with least-privilege permissions
  • Requiring explicit authorization before destructive or bulk-update operations
  • Adding safeguards that prevent unexpectedly broad result sets or affected-row counts

How teams detect issues like this

Detection approaches may include:

  • Static analysis for string concatenation involving PostgREST filters or database query parameters
  • Code review checks for externally controlled values reaching Supabase node operations
  • Workflow policy rules requiring validation before database actions
  • Runtime monitoring for unusual filter expressions, full-table reads, or unexpectedly large delete and update counts
  • Automated security review tools that identify injection-prone data-to-query flows

Sources

SourceLink
github.comgithub.com/n8n-io/n8n/security/advisories/GHSA-f4f3-2g67-4vhm
vulncheck.comvulncheck.com/advisories/n8n-before-postgrest-filter-injection-via-supabase

Frequently asked

questions

It may be exploitable through a remotely reachable n8n workflow when external input can influence a vulnerable Supabase filter operation. Exploitability depends on workflow exposure and input handling.

An attacker generally needs permission to trigger an affected workflow or another way to control a value used in the database filter. The required access depends on the n8n deployment and workflow authorization model.

Use parameter-safe filter construction, validate values against strict expected formats, and prevent data values from being interpreted as query expressions.

Apply least-privilege database permissions, review all externally influenced workflow inputs, monitor for unexpectedly broad database operations, and enforce secure query-construction policies in development and code review.

Find out what's already
exploitable in your codebase.