/

CVE-2026-24769

Severity:

CRITICAL RISK

(9.0)

Stored XSS in NocoDB Attachment Handling

CVE-2026-24769

Analyzed

Vulnerability type

Category:

Stored Cross-Site Scripting (XSS)

CWE:

CWE-79, CWE-434

Impact:

Account Takeover and Data Exfiltration via Stored XSS

Severity:

CRITICAL RISK

(9.0)

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's attachment handling mechanism allows authenticated users to upload SVG files that can contain executable JavaScript, which is later rendered inline in other users' browsers.

Because the payload is stored on the server and executed under NocoDB's origin, this stored XSS can lead to account compromise, data exfiltration, and unauthorized actions within the application.

Affected context

This vulnerability occurs in NocoDB instances where:

  • Users are allowed to upload attachments, including SVG images
  • Attachments are later displayed inline in the web UI without sufficient sanitization
  • Sessions rely on browser-based authentication (e.g., cookies, local storage tokens)

The issue is most impactful in multi-user deployments where users can view each other's uploaded attachments, such as shared workspaces or collaborative database projects.

Exploit preconditions

  • Attack surface: NocoDB web interface, specifically attachment upload and viewing functionality
  • Required access: Authenticated user with permission to upload attachments to a workspace/table
  • Trigger point: Another user (or admin) opens a page that renders the malicious SVG inline in their browser
  • Why exploitation is possible: SVG uploads are treated as active content and rendered without robust sanitization or conversion, allowing embedded JavaScript to execute in the context of the NocoDB origin

Why this happens

The underlying issue maps to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting).

NocoDB accepts user-uploaded SVG files and later embeds them in the application UI without sufficiently neutralizing active content (e.g., scriptable elements, event handlers, or JavaScript-capable constructs).

Because SVG is both an image and a document format, treating it as a safe static asset while rendering it inline exposes script execution capabilities.

This behavior is compounded by aspects of CWE-434: Unrestricted Upload of File with Dangerous Type, where a file type that can carry active script content is permitted and later delivered in a way that the browser interprets as executable.

Potential impact

  • Hijacking of victim user sessions and potential account takeover
  • Unauthorized actions performed on behalf of logged-in users (e.g., modifying tables, changing configurations, inviting/removing users)
  • Theft of sensitive data accessible via the UI, including table contents and metadata
  • Installation of further client-side payloads for long-lived browser-based persistence
  • Lateral movement through the application by targeting higher-privileged users, such as workspace admins or system administrators

General mitigation guidance

Effective mitigation generally combines strict handling of active file types with defensive output encoding:

  • Treat SVG and other script-capable formats as potentially dangerous and, where feasible, disable their upload or restrict them to non-inline, download-only delivery.
  • Prefer converting uploaded images to safe raster formats (e.g., PNG/JPEG) on the server before display, eliminating embedded script capabilities.
  • Apply context-appropriate output encoding for any user-controlled content that is rendered in the DOM, ensuring that markup and script are not interpreted as active code.
  • Enforce a conservative Content Security Policy (CSP) that limits inline JavaScript execution and restricts script sources to trusted origins.
  • Apply least-privilege design to user roles and minimize sensitive operations that can be triggered via the normal web UI, reducing XSS blast radius.

These patterns reduce the exploitability of stored payloads and limit the damage if a similar issue appears elsewhere.

How teams detect issues like this

Detection typically focuses on both code-level patterns and runtime behavior:

  • Use static analysis or linters to flag unsanitized insertion of user-controlled content into HTML, SVG, or DOM APIs.
  • During code review, pay special attention to:
  • File upload endpoints and any logic that determines allowed types or post-processing
  • Places where attachments are rendered inline, especially <img>, <object>, <embed>, <iframe>, or direct DOM manipulation with innerHTML-like APIs
  • Implement server-side logging for attachment uploads, including MIME type, file extension, and user identity, and periodically review for suspicious SVG or HTML uploads.
  • Apply security testing (SAST/DAST) and automated scanning that includes checks for stored XSS via file uploads and rich content fields.
  • Consider integrating automated security review tools into CI/CD to enforce policies on dangerous file types and unescaped output.

Sources

SourceLink
github.comgithub.com/nocodb/nocodb/security/advisories/GHSA-q5c6-h22r-qpwr

Frequently asked

questions

Yes. Any remote attacker who can register or obtain an account with permission to upload attachments can exploit this issue. Other users who access the affected NocoDB instance via a browser can then be targeted when they view the malicious attachment.

No. Exploitation only requires an authenticated user account with the ability to upload attachments to a shared context. However, the impact is significantly higher if the attacker can get an administrator or workspace owner to view the malicious attachment.

The most robust fix pattern is to treat SVG and similar active formats as untrusted: either disallow them entirely or convert them to a safe, non-scriptable format before serving, combined with strict output encoding whenever user-controlled content is inserted into the DOM.

Establish a secure file-handling policy that classifies file types by risk, apply centralized sanitization and encoding routines for any user-supplied content, implement a strong CSP that discourages inline script execution, and include XSS/file-upload checks as standard items in code review and automated security testing.

Find out what's already
exploitable in your codebase.