Summary
NocoDB has a stored cross-site scripting vulnerability in which authenticated Creator or Editor users can inject markup into fields rendered through URL() formulas. When another user views the affected table, unsanitized formula output may execute in their browser, exposing session tokens and enabling account takeover.
Affected context
The issue occurs in NocoDB's canvas grid renderer when it displays output from URL() formulas. The renderer assigns formula output to innerHTML without sanitizing it, so deployments may be at risk when users with Creator or Editor permissions can supply content that is later rendered to other users.
Exploit preconditions
- Attack surface: NocoDB tables displayed in the canvas grid
- Required access: An authenticated Creator or Editor account able to add or modify relevant field content
- Trigger point: A user views a table containing formula output derived from attacker-controlled markup
- Why exploitation is possible: The renderer inserts unsanitized formula output into
innerHTML, allowing browser script execution in the application context
Why this happens
The underlying bug is unsafe rendering of untrusted content. Assigning attacker-influenced formula output to innerHTML treats the value as HTML rather than inert text, creating a stored cross-site scripting condition. This maps to CWE-79: Improper Neutralization of Input During Web Page Generation.
Potential impact
- Script execution in the browser of a user viewing the affected table
- Exposure of session tokens stored in localStorage
- Account takeover for users whose tokens are compromised
- Unauthorized actions performed through an affected user's account
General mitigation guidance
Defensive approaches focus on keeping untrusted values from being interpreted as executable markup.
- Render formula output as text by default, using context-appropriate output encoding.
- Where rich HTML is genuinely required, apply a well-maintained, restrictive HTML sanitization policy.
- Reduce trust in user-controlled formula inputs and validate data according to the intended format.
- Apply least privilege to roles that can create or edit content rendered to other users.
- Use secure-by-default rendering components that avoid direct
innerHTMLassignments.
How teams detect issues like this
- Use static analysis to identify
innerHTMLassignments involving formula results or other user-controlled values. - Review rendering paths for missing output encoding or sanitization, especially in grid and formula display components.
- Add security tests that verify untrusted formula output is rendered inertly.
- Enforce code-review or CI policies for unsafe DOM sinks and require approved sanitization where HTML rendering is necessary.
- Automated code review tools may help flag potentially unsafe DOM assignments.

