CVE-2021-23439Johndatserakis File-upload-with-preview
Medium 6.1 No auth needed
Follow: this CVE · Johndatserakis · Johndatserakis File-upload-with-preview We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 0.9% probability of exploitation in 30 days · percentile 61
- Auth required
- No
- Published
- Sep 5, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
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).
What to do
- Apply the vendor's security update for File-upload-with-preview.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | file-upload-with-preview |
< 4.2.0 |
4.2.0 |
npm install file-upload-with-preview@4.2.0 |
Per OSV / GitHub Advisories (GHSA-97pv-4338-r5vp). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| johndatserakis | file-upload-with-preview | < 4.2.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Broken Link
- github.com Patch Third Party Advisory
- snyk.io Third Party Advisory