Description
Saltcorn through 1.7.0-beta.5 contains a stored DOM-based cross-site scripting vulnerability that allows authenticated users to inject script by uploading files with percent-encoded HTML names. The expand_thumbnail() function decodes the file name with decodeURIComponent and inserts it via jQuery .html(), executing script when any user, including administrators, clicks the thumbnail.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Saltcorn | @saltcorn/server | ≤ 1.7.0-beta.5 | — |
References
- https://github.com/saltcorn/saltcorn/blob/v1.7.0-beta.5/packages/server/public/saltcorn.js#L431-L438 technical-description
- https://github.com/saltcorn/saltcorn/blob/v1.7.0-beta.5/packages/saltcorn-data/base-plugin/fileviews.ts#L560-L590 technical-description
- https://github.com/saltcorn/saltcorn/blob/v1.7.0-beta.5/packages/saltcorn-data/models/file.ts#L1050-L1062 technical-description
- VulnCheck Advisory: Saltcorn through 1.7.0-beta.5 Stored DOM XSS via Uploaded File Name in Thumbnail third-party-advisory