{"id":"CVE-2026-24769","aliases":["CVE-2026-24769","GHSA-q5c6-h22r-qpwr"],"related":[],"kind":"vulnerability","state":"published","title":"NocoDB Vulnerable to Stored Cross-Site Scripting via SVG upload","summary":"NocoDB is software for building databases as spreadsheets. Prior to version 0.301.0, 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. Version 0.301.0 patches the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"NocoDB is software for building databases as spreadsheets. Prior to version 0.301.0, 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. Version 0.301.0 patches the issue.","source":"cvelist"},{"lang":"en","text":"## 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).","format":"markdown","source":"ghsa"},{"lang":"es","text":"NocoDB es un software para construir bases de datos como hojas de cálculo. Antes de la versión 0.301.0, existe una vulnerabilidad de cross-site scripting (XSS) almacenado en el mecanismo de manejo de archivos adjuntos de NocoDB. Usuarios autenticados pueden subir archivos SVG maliciosos que contienen JavaScript incrustado, los cuales son posteriormente renderizados en línea y ejecutados en los navegadores de otros usuarios que ven el archivo adjunto. Debido a que la carga útil maliciosa se almacena en el lado del servidor y se ejecuta bajo el origen de la aplicación, la explotación exitosa puede llevar a compromiso de la cuenta, exfiltración de datos y acciones no autorizadas realizadas en nombre de los usuarios afectados. La versión 0.301.0 corrige el problema.","source":"nvd"}],"published":"2026-01-28T20:36:23.859Z","modified":"2026-06-17T10:23:33.740Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","score":9,"rating":"CRITICAL"}],"cwes":["CWE-79","CWE-434"],"affected":[{"ranges":[{"version":"< 0.301.0","status":"affected"}],"vendor":"nocodb","product":"nocodb","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.301.0"}],"ecosystem":"npm","package":"nocodb","purl":"pkg:npm/nocodb","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.301.0"}],"vendor":"nocodb","product":"nocodb","cpe":"cpe:2.3:a:nocodb:nocodb:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/nocodb/nocodb/security/advisories/GHSA-q5c6-h22r-qpwr","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-24769","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nocodb/nocodb","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-01-29T14:00:29.747Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-24769","url":"https://www.cve.org/CVERecord?id=CVE-2026-24769","licence":"CVE Terms of Use","modified":"2026-01-29T14:02:12.813Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-q5c6-h22r-qpwr","url":"https://github.com/advisories/GHSA-q5c6-h22r-qpwr","licence":"CC-BY-4.0","modified":"2026-02-03T03:05:57.386Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-24769","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-24769","licence":"Public domain","modified":"2026-06-17T10:23:33.740Z"}],"updatedAt":"2026-11-25T22:59:13.281Z","epss":{"score":0.00433,"percentile":0.39403,"date":"2026-12-01T12:00:22.000Z"}}