All reports
Medium

NocoDB Vulnerable to SQL Injection via DATEADD Formula

Affected versions

Affected versions
<= 0.301.2
Fixed version
0.301.3

Exploitation

CVE-2026-28399

Probability of exploitation in the next 30 days: 0.36%

FIRST EPSS · 2026-11-22

Description

Summary

An authenticated user with Creator role can inject arbitrary SQL via the DATEADD formula's unit parameter.

Details

The third argument (unit) of DATEADD was interpolated directly into knex.raw() queries after only stripping quote characters. Validation in formulas.ts only checked Literal AST node types — non-Literal types bypassed validation entirely. Affected MySQL, PostgreSQL, and SQLite function mappings.

Impact

SQL injection allowing data exfiltration or modification, scoped to the connected database.

Credit

This issue was reported by @q1uf3ng.

Links

Credits

  • q1uf3ng
  • zuhairhalawa