CVE-2026-24769: Nocodb Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-q5c6-h22r-qpwr
CWE-434 CWE-79
Published
Advisory Summary

CVE-2026-24769 is a HIGH cross-site scripting vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Nocodb libraries in the npm ecosystem. The issue involves nocodb vulnerable to stored cross-site scripting via svg upload. Remediation is available by upgrading affected packages to version 0.301.0.

CVE-2026-24769 at a Glance

CVE Identifier CVE-2026-24769
GHSA Identifier GHSA-q5c6-h22r-qpwr
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product Nocodb
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-24769

To remediate this vulnerability, upgrade all affected Nocodb dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

nocodb fixed: 0.301.0
npm install nocodb@0.301.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls nocodb

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-24769, inspect your project dependencies using npm:

npm ls nocodb

Analyze the terminal output to locate any version of Nocodb in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.301.0), your application is affected.

Note: The npm ls nocodb command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. In Nocodb, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary A **stored Cross-site Scripting (XSS)** vulnerability exists in NocoDB’s attachment handling mechanism. Authenticated users can upload malicious SVG files containing embedded JavaScript, which are later rendered inline and executed in the browsers of other users who view the attachment. Because the malicious payload is stored server-side and executed under the application’s origin, successful exploitation can lead to account compromise, data exfiltration and unauthorized actions performed on behalf of affected users. --- ## Vulnerability Details NocoDB allows file attachments to be previewed inline based on their MIME type. Due to overly permissive MIME type checks and a lack of content sanitization, SVG files containing executable JavaScript are incorrectly treated as safe image content and rendered directly in the browser. ### Root Cause The vulnerability results from a combination of **overly permissive MIME type classification** and **unsafe file serving behavior**. #### 1. Permissive MIME Type Check In `attachmentHelpers.ts`, files are considered previewable if their MIME type contains certain substrings: ```ts const previewableMimeTypes = ['image', 'pdf', 'video', 'audio']; export const isPreviewAllowed = (args: { mimetype?: string } = {}) => { const { mimetype } = args; if (!mimetype) return false; return previewableMimeTypes.some((type) => mimetype.includes(type)); }; ``` This substring-based check (`includes`) causes files with the MIME type `image/svg+xml` to be classified as safe for inline preview. However, SVG is an XML-based format that supports executable JavaScript via `<script>` elements, event handlers, and external references. No additional validation or sanitization is performed on SVG content after this classification. #### 2. Unsafe Inline File Serving Uploaded attachments are served by the `fileReadv3` endpoint in `attachments.controller.ts` without sanitization or content-type enforcement: ```ts @Get('/dltemp/:param(*)') async fileReadv3(@Param('param') param: string, @Res() res: Response) { // No authentication guard // Sets headers from query parameters res.setHeader('Content-Type', queryParams.contentType); res.setHeader('Content-Disposition', queryParams.contentDisposition); // Sends raw file content res.sendFile(file.path); } ``` The endpoint: * Preserves the original `Content-Type` (`image/svg+xml`) * Uses `Content-Disposition: inline` * Sends the raw file contents unmodified As a result, browsers render the SVG inline and execute any embedded JavaScript under the NocoDB application’s origin. --- ## Impact This is a **stored XSS** vulnerability that can be exploited by authenticated users with permission to upload attachments. Potential impacts include: * Account takeover * Theft of session cookies or API tokens * Unauthorized actions performed on behalf of victims * Privilege escalation if higher-privileged users view the malicious attachment --- ## Credit This issue was discovered by an AI agent developed by the GitHub Security Lab and reviewed by GHSL team members @p- (Peter Stöckli) and @m-y-mo (Man Yue Mo).

CVE-2026-24769 Affected Nocodb Versions

1 component(s)
Fixed Versions:
0.301.0
Product / Package Ecosystem Affected Versions Fixed Version
nocodb
npm
< 0.301.0
0.301.0

References

Frequently Asked Questions

What is CVE-2026-24769?
CVE-2026-24769 is a security vulnerability in Nocodb involving NocoDB Vulnerable to Stored Cross-Site Scripting via SVG upload under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which Nocodb versions are affected?
Affected versions include releases prior to 0.301.0 across affected packages: nocodb.
What version fixes CVE-2026-24769?
Upgrading to 0.301.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nocodb affected?
Yes, nocodb is affected in releases prior to 0.301.0. Upgrade your dependency to 0.301.0 or later.
What CWE is associated with CVE-2026-24769?
CVE-2026-24769 is classified under CWE-434: Unrestricted Upload of File with Dangerous Type (The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.).
How can I check npm dependencies for CVE-2026-24769?
Run the dependency tree command: 'npm ls nocodb'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q5c6-h22r-qpwr",
  "modified" : "2026-01-28T21:41:03Z",
  "published" : "2026-01-28T21:41:03Z",
  "aliases" : [ "CVE-2026-24769" ],
  "summary" : "NocoDB Vulnerable to Stored Cross-Site Scripting via SVG upload",
  "details" : "## Summary\n\nA **stored Cross-site Scripting (XSS)** vulnerability exists in NocoDB’s attachment handling mechanism. Authenticated users can upload malicious SVG files containing embedded JavaScript, which are later rendered inline and executed in the browsers of other users who view the attachment.\n\nBecause the malicious payload is stored server-side and executed under the application’s origin, successful exploitation can lead to account compromise, data exfiltration and unauthorized actions performed on behalf of affected users.\n\n---\n\n## Vulnerability Details\n\nNocoDB allows file attachments to be previewed inline based on their MIME type. Due to overly permissive MIME type checks and a lack of content sanitization, SVG files containing executable JavaScript are incorrectly treated as safe image content and rendered directly in the browser.\n\n### Root Cause\n\nThe vulnerability results from a combination of **overly permissive MIME type classification** and **unsafe file serving behavior**.\n\n#### 1. Permissive MIME Type Check\n\nIn `attachmentHelpers.ts`, files are considered previewable if their MIME type contains certain substrings:\n\n```ts\nconst previewableMimeTypes = ['image', 'pdf', 'video', 'audio'];\n\nexport const isPreviewAllowed = (args: { mimetype?: string } = {}) => {\n  const { mimetype } = args;\n  if (!mimetype) return false;\n  return previewableMimeTypes.some((type) => mimetype.includes(type));\n};\n```\n\nThis substring-based check (`includes`) causes files with the MIME type `image/svg+xml` to be classified as safe for inline preview. However, SVG is an XML-based format that supports executable JavaScript via `<script>` elements, event handlers, and external references.\n\nNo additional validation or sanitization is performed on SVG content after this classification.\n\n#### 2. Unsafe Inline File Serving\n\nUploaded attachments are served by the `fileReadv3` endpoint in `attachments.controller.ts` without sanitization or content-type enforcement:\n\n```ts\n@Get('/dltemp/:param(*)')\nasync fileReadv3(@Param('param') param: string, @Res() res: Response) {\n  // No authentication guard\n\n  // Sets headers from query parameters\n  res.setHeader('Content-Type', queryParams.contentType);\n  res.setHeader('Content-Disposition', queryParams.contentDisposition);\n\n  // Sends raw file content\n  res.sendFile(file.path);\n}\n```\n\nThe endpoint:\n\n* Preserves the original `Content-Type` (`image/svg+xml`)\n* Uses `Content-Disposition: inline`\n* Sends the raw file contents unmodified\n\nAs a result, browsers render the SVG inline and execute any embedded JavaScript under the NocoDB application’s origin.\n\n---\n\n## Impact\n\nThis is a **stored XSS** vulnerability that can be exploited by authenticated users with permission to upload attachments.\n\nPotential impacts include:\n\n* Account takeover\n* Theft of session cookies or API tokens\n* Unauthorized actions performed on behalf of victims\n* Privilege escalation if higher-privileged users view the malicious attachment\n\n---\n\n## Credit\n\nThis issue was discovered by an AI agent developed by the GitHub Security Lab and reviewed by GHSL team members @p- (Peter Stöckli) and @m-y-mo (Man Yue Mo).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "nocodb"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.301.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nocodb/nocodb/security/advisories/GHSA-q5c6-h22r-qpwr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-24769"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nocodb/nocodb"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-434", "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-28T21:41:03Z",
    "nvd_published_at" : "2026-01-28T21:16:12Z"
  }
}