Summary
NocoDB contains a stored cross-site scripting vulnerability in which an authenticated Creator can place markup in a column or table title. When a victim deletes an external-source table, the confirmation dialog may render that title as HTML, allowing script to run in the victim's browser and potentially expose session tokens stored in localStorage.
Affected context
The issue affects NocoDB deployments using the vulnerable Delete.vue confirmation dialog. It becomes risky when a Creator can set a title containing markup and another user opens the dialog while deleting an external-source table. The dialog renders the title through an unescaped innerHTML binding.
Exploit preconditions
- Attack surface: NocoDB's web interface and table-deletion confirmation dialog
- Required access: An authenticated Creator account able to set or modify column or table titles
- Victim interaction: A user must reach the confirmation dialog while deleting an external-source table
- Trigger point: The dialog renders the stored title as HTML
- Why exploitation is possible: Unescaped HTML rendering allows attacker-controlled markup to execute script in the victim's browser
Why this happens
The underlying issue is unsafe handling of user-controlled content in an HTML-rendering context. Binding a stored title to innerHTML without appropriate escaping or sanitization can cause markup to be interpreted as executable browser content. This maps to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Potential impact
- Script may execute in a victim's authenticated browser session
- Session tokens stored in localStorage could be exposed
- An attacker could potentially perform actions available to the victim
- The affected user's data and account may be put at risk
General mitigation guidance
Defensive patterns focus on treating titles as text rather than trusted HTML:
- Use framework text interpolation or other context-aware output encoding instead of direct innerHTML rendering
- If rich text is required, apply a well-maintained sanitizer with a narrowly defined allowlist
- Validate and constrain title input, while still encoding it at the point of output
- Limit Creator permissions to users who need them and apply least privilege to accounts and sessions
- Avoid storing session credentials in browser-accessible storage where practical, and use appropriate session protections
How teams detect issues like this
- Use static analysis to identify user-controlled values flowing into innerHTML or equivalent HTML-rendering sinks
- Review confirmation dialogs and other UI components that display stored titles or labels
- Test that markup entered into titles is displayed as inert text in relevant user workflows
- Apply code-review and CI policies that restrict unsafe HTML rendering to explicitly reviewed cases
- Monitor for suspicious title content and unexpected client-side behavior

