/

CVE-2026-126291

Severity:

HIGH RISK

(8.8)

SQL Injection (CWE-89) in NocoDB User Field Queries

CVE-2026-126291

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Sensitive data exposure through SQL injection

Severity:

HIGH RISK

(8.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

NocoDB contains an SQL injection flaw in queries that resolve user-related fields because member email addresses are concatenated into SQL text. A registered user who can set an email address with a quoted local part may be able to execute arbitrary SQL, potentially exposing user records, API tokens, and data-source credentials.

Affected context

The issue occurs in NocoDB's handling of base-member email addresses when resolving user, created-by, or last-modified-by fields. It is relevant to deployments using affected code before 2026.06.2, where email values are incorporated into SQL queries without safe parameterization.

Exploit preconditions

  • Attack surface: Application queries that resolve user, created-by, or last-modified-by fields
  • Required access: A registered account with the ability to set an email address
  • Trigger point: Processing a relevant query containing the member's email address
  • Why exploitation is possible: The email value is concatenated into SQL text, allowing a quoted local part to alter query syntax

Why this happens

The underlying bug is the construction of SQL statements by concatenating a user-controlled email value into query text. This fails to keep data separate from SQL instructions, mapping to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

Potential impact

  • Attackers may access user records beyond their intended permissions
  • API tokens and data-source credentials could be exposed
  • Depending on database permissions and query behavior, data could be altered or other database operations could be affected

General mitigation guidance

Defensive patterns focus on ensuring user-controlled values are always treated as data rather than SQL syntax.

Common approaches include:

  • Use parameterized queries or prepared statements for all values
  • Avoid building SQL statements through string concatenation
  • Validate inputs against the expected email format as a supplementary control, not a substitute for parameterization
  • Apply least-privilege permissions to database accounts and restrict access to sensitive records
  • Limit exposure of tokens and credentials through appropriate access controls and storage practices

How teams detect issues like this

  • Use static analysis to identify SQL statements built with string concatenation or interpolation
  • Review query-building code that incorporates user profiles, email addresses, or other mutable fields
  • Enforce code-review and CI policies requiring parameterized database access
  • Monitor for unusual query errors or unexpected access to sensitive records
  • Automated code review tools may help flag unsafe query construction patterns

Sources

SourceLink
github.comgithub.com/nocodb/nocodb/security/advisories/GHSA-8qgc-rxmx-p7cw
vulncheck.comvulncheck.com/advisories/nocodb-before-2026.06.2-sql-injection-via-user-email-in-base-user-query

Frequently asked

questions

It may be exploitable through application query paths if an attacker can submit or control an email address that is later used to resolve a user-related field.

The described condition requires a registered user who can set an email address containing a quoted local part. The relevant field-resolution query must then process that value.

Use parameterized queries so email addresses and other user-controlled values cannot change the structure of SQL statements.

Combine parameterized database access with static analysis, code review of query construction, and least-privilege database permissions.

Find out what's already
exploitable in your codebase.