GHSA-3F7W-WQF7-786Q
Stored Cross-Site Scripting via Attachment MIME Type
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-3F7W-WQF7-786Q divulgada · CVSS 8.7 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The attachment preview gate compared the stored MIME type against its allow-list with a substring match, so a crafted value that resolved to `text/html` while containing an allow-listed token was served inline from NocoDB's own origin as an HTML document.
Details
`attachmentHelpers.ts` decided previewability with `previewableMimeTypes.some((type) => mimetype.includes(type))`, a substring test over the whole stored string. A value such as `text/html;image/png` passed that gate, and `PresignedUrl.ts` then set `Content-Disposition: inline` and echoed the stored MIME type verbatim as the response content type, which the `/dltemp` handler in `attachments.controller.ts` wrote onto the response before sending the file. No `X-Content-Type-Options: nosniff` header and no `script-src` policy were set on those responses. The multipart upload path normalises an uploaded part's content type, but the records API stored an attachment cell's `mimetype` without any validation, so the crafted value could be written directly into a record; the signed URL that serves the file needs no authentication, and the in-app PDF preview embeds the same response.
Impact
Same-origin script execution in the browser of any user who opens the attachment, either from the record in the application or by following the signed link. The payload runs in the NocoDB origin and can read the session token from `localStorage["nocodb-gui-v2"]`, allowing an attacker to impersonate the victim through the authenticated API, with greater reach if the victim is a base owner or super administrator. Storing the attachment requires a base Editor role or above; serving it requires no authentication.
Credit
This issue was reported by @PratibhaDevi29 https://github.com/PratibhaDevi29.
Desglose de métricas
Estado del parche por paquete
La fuente no informa paquetes ni versiones corregidas.
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/nocodb/nocodb/security/advisories/GHSA-3f7w-wqf7-786qLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
