# CVE-2021-23439: Cross-site Scripting (XSS)

- Severity: Medium 4.2 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.89%, higher than 60% of CVEs (2026-12-01)
- Published: 2021-09-05T14:10:11.175Z
- Modified: 2026-06-17T03:38:45.947Z
- Also known as: GHSA-97pv-4338-r5vp
- Weaknesses: CWE-79
- Assigned by: snyk

## 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).

(As written by CVE List.)

## Affected

- file-upload-with-preview: from unspecified before 4.2.0
- file-upload-with-preview (npm): before 4.2.0
- johndatserakis file-upload-with-preview: before 4.2.0

## Every score

- snyk: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P`
- GitHub: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://snyk.io/vuln/SNYK-JS-FILEUPLOADWITHPREVIEW-1579492> (third-party-advisory, web)
- <https://github.com/johndatserakis/file-upload-with-preview/blob/develop/src/file-upload-with-preview.js%23L168> (broken-link, web)
- <https://github.com/johndatserakis/file-upload-with-preview/pull/40/files?file-filters%5B%5D=.js&hide-deleted-files=true%23diff-fe47b243de17419c0daa22cd785cd754baed60cf3679d3da1d6fe006f9f4a7f0R174> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23439> (advisory)
- <https://github.com/johndatserakis/file-upload-with-preview> (package)

## Sources

- CVE List: [CVE-2021-23439](https://www.cve.org/CVERecord?id=CVE-2021-23439), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-97pv-4338-r5vp](https://github.com/advisories/GHSA-97pv-4338-r5vp), CC-BY-4.0, modified 2026-03-13
- NVD: [CVE-2021-23439](https://nvd.nist.gov/vuln/detail/CVE-2021-23439), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23439 · Whole record: https://cve.day/CVE-2021-23439.json · Rebuilt by cve.day 2026-11-25T22:58:03.650Z
