/

CVE-2026-126285

Severity:

HIGH RISK

(7.7)

SQL Injection (CWE-89) in NocoDB Legacy PostgreSQL Filters

CVE-2026-126285

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized data disclosure

Severity:

HIGH RISK

(7.7)

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

NocoDB versions before 2026.08.0 have a SQL injection vulnerability in the legacy where parameter on PostgreSQL. An authenticated user with read access, including a Viewer-role user, may exploit it to run read queries that expose data beyond their permitted view.

Affected context

The issue occurs in NocoDB's PostgreSQL filtering path when the legacy where parameter is used. It is risky where filter values are concatenated into SQL rather than safely bound, allowing an authenticated user with read access to influence the resulting query.

Exploit preconditions

  • Attack surface: PostgreSQL-backed NocoDB filtering through the legacy where parameter
  • Required access: An authenticated account with read access; Viewer-role access may be sufficient
  • Trigger point: Processing a filter whose value is incorporated into a query by CustomKnex.ts
  • Why exploitation is possible: Filter values are concatenated into SQL, allowing crafted input to alter read-query structure

Why this happens

The underlying bug is unsafe SQL construction: user-controlled filter values are concatenated into a query instead of being passed as bound parameters. This maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), because input can change the meaning of the SQL statement.

Potential impact

  • Users may read data from other tables or schemas
  • Queries may expose rows beyond intended view filters
  • Hidden columns may become accessible
  • Sensitive information may be disclosed to authenticated users without the appropriate data permissions

General mitigation guidance

Mitigation patterns focus on keeping user-controlled values separate from SQL structure.

  • Use parameterized queries or query-builder bindings for filter values
  • Prefer structured, allowlisted filter APIs over legacy free-form query parameters
  • Validate filter fields and operators against the user's authorized data scope
  • Apply authorization checks to the resulting query, not only to the requested table or view
  • Follow least-privilege principles for database and application accounts

How teams detect issues like this

  • Use static analysis to flag SQL assembled through string concatenation with request or filter values
  • Review query-builder calls to confirm values are bound rather than interpolated
  • Test that filter inputs cannot broaden access to other tables, schemas, rows, or columns
  • Enforce code-review and CI policies requiring parameterized database access
  • Monitor for unusual read-query patterns and access to data outside expected scopes

Sources

SourceLink
github.comgithub.com/nocodb/nocodb/security/advisories/GHSA-f2jp-xg6f-hjf6
vulncheck.comvulncheck.com/advisories/nocodb-before-2026.08.0-sql-injection-via-legacy-where-query-filter

Frequently asked

questions

An authenticated user with read access may be able to exploit it; Viewer-role users are included in the described scope.

No database administrator access is specified as necessary. The relevant prerequisite is an authenticated account with read access and a path that processes the legacy where parameter on PostgreSQL.

Bind filter values as query parameters and avoid constructing SQL by concatenating user-controlled input.

Prefer structured filter interfaces, enforce authorization at query time, and review database access code for unbound user input.

Find out what's already
exploitable in your codebase.