What’s Vulnerable › Vulnerabilities
CVE-2021-23439: Cross-site Scripting (XSS)
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.9% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-09-05 · updated 2026-06-17
- Weakness: CWE-79
Description
This affects the package file-upload-with-preview before 4.2.0. A file containing malicious JavaScript code in the name can be uploaded (a user needs to be tricked into uploading such a file).
Affected products
- file-upload-with-preview: before 4.2.0 — fixed in 4.2.0
How to fix
Upgrade to a fixed version: file-upload-with-preview 4.2.0. Check the vendor advisory for mitigations.
References
- https://github.com/johndatserakis/file-upload-with-preview/blob/develop/src/file-upload-with-preview.js%23L168
- https://github.com/johndatserakis/file-upload-with-preview/pull/40/files?file-filters%5B%5D=.js&hide-deleted-files=true%23diff-fe47b243de17419c0daa22cd785cd754baed60cf3679d3da1d6fe006f9f4a7f0R174
- https://snyk.io/vuln/SNYK-JS-FILEUPLOADWITHPREVIEW-1579492
- https://github.com/johndatserakis/file-upload-with-preview/blob/develop/src/file-upload-with-preview.js%23L168
- https://github.com/johndatserakis/file-upload-with-preview/pull/40/files?file-filters%5B%5D=.js&hide-deleted-files=true%23diff-fe47b243de17419c0daa22cd785cd754baed60cf3679d3da1d6fe006f9f4a7f0R174
- https://snyk.io/vuln/SNYK-JS-FILEUPLOADWITHPREVIEW-1579492
Get alerted when CVE-2021-23439 or the next vulnerability affects your stack