/

CVE-2026-130706

Severity:

CRITICAL RISK

(9.1)

SQL Injection (CWE-89) in NocoDB Formula Tree Parsing

CVE-2026-130706

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

SQL injection with potential privilege escalation and command execution

Severity:

CRITICAL RISK

(9.1)

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 a SQL injection flaw in formula handling: a crafted formula tree can be persisted and later reused without revalidation. An authenticated Creator or Owner may exploit this behavior to escalate privileges, and under certain database configurations could cause operating-system commands to run on an external PostgreSQL host.

Affected context

The issue affects NocoDB deployments with vulnerable formula handling. It occurs when a crafted parsed formula tree is persisted and reused without revalidation; the described path can bypass a SQLite metadata path guard through an alias. The reported affected releases are those before 2026.09.0.

Exploit preconditions

  • Attack surface: NocoDB formula parsing and persistence
  • Required access: An authenticated Creator or Owner account
  • Trigger point: Reuse of a persisted crafted formula tree
  • Why exploitation is possible: The tree is reused without revalidation, and an alias can bypass the SQLite metadata path guard. Further impact depends on database configuration and permissions.

Why this happens

The underlying flaw is SQL injection (CWE-89): formula-derived data is treated as trusted when constructing or processing SQL. Persisting a parsed tree and reusing it without validating it at the point of use can allow crafted input to cross the boundary into SQL operations. A path guard that can be bypassed through an alias does not reliably protect that boundary.

Potential impact

  • Crafted input may alter SQL operations or access data beyond intended boundaries.
  • An authenticated user may be able to escalate privileges, potentially to super administrator.
  • In some external PostgreSQL configurations, database-side behavior may enable operating-system command execution on the database host.
  • Data confidentiality, integrity, or service availability could be affected.

General mitigation guidance

Defensive patterns focus on keeping user-controlled formula data separate from executable SQL:

  • Use parameterized queries and safe query-building APIs rather than interpolating formula content.
  • Validate and normalize formula trees at the point of use, including after persistence or transformations.
  • Apply strict allowlists for formula operations, identifiers, and supported expression types.
  • Make path and alias checks canonical and consistent across validation and use.
  • Limit database account privileges and avoid granting unnecessary host-level capabilities.
  • Treat persisted user-generated formulas as untrusted input and restrict who can create or modify them.

How teams detect issues like this

  • Use static analysis to identify SQL construction involving formula-derived values and unsafe string interpolation.
  • Review code paths where parsed or persisted trees are reused without validation, especially around aliases and path checks.
  • Enforce policies that require parameterized queries and approved query-building APIs.
  • Monitor for unexpected formula changes, unusual administrative privilege changes, and anomalous database activity.
  • Automated code review tools can help flag risky query construction and missing validation boundaries.

Sources

SourceLink
github.comgithub.com/nocodb/nocodb/security/advisories/GHSA-frqc-xh5h-rrcw

Frequently asked

questions

The described attack requires an authenticated Creator or Owner account, along with a formula path that permits a crafted tree to be persisted and reused.

No. Command execution is described as a possible outcome on external PostgreSQL hosts and depends on database configuration and permissions. SQL injection and privilege escalation are the broader reported risks.

Keep formula input out of executable SQL by using parameterized queries or safe query builders, and validate formula trees again at the point of use.

Treat persisted user-generated data as untrusted, use strict allowlists, make security checks resistant to aliases and alternate representations, and enforce least privilege for application and database accounts.

Find out what's already
exploitable in your codebase.