NocoDB Vulnerable to SQL Injection via DATEADD Formula
Description
Published by the National Vulnerability Database
Mar 2, 2026
Published to the GitHub Advisory Database
Mar 3, 2026
Reviewed
Mar 3, 2026
Last updated
Mar 3, 2026
Summary
An authenticated user with Creator role can inject arbitrary SQL via the DATEADD formula's unit parameter.
Details
The third argument (unit) of
DATEADDwas interpolated directly intoknex.raw()queries after only stripping quote characters. Validation informulas.tsonly checkedLiteralAST 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.
References