{"id":"GHSA-97pv-4338-r5vp","summary":"Cross-site Scripting in file-upload-with-preview","details":"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).","aliases":["CVE-2021-23439"],"modified":"2026-03-13T22:11:17.274119Z","published":"2021-09-07T23:08:54Z","database_specific":{"cwe_ids":["CWE-79"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2021-09-07T18:05:06Z","nvd_published_at":"2021-09-05T14:15:00Z"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23439"},{"type":"WEB","url":"https://github.com/johndatserakis/file-upload-with-preview/pull/40/files?file-filters%5B%5D=.js&hide-deleted-files=true%23diff-fe47b243de17419c0daa22cd785cd754baed60cf3679d3da1d6fe006f9f4a7f0R174"},{"type":"PACKAGE","url":"https://github.com/johndatserakis/file-upload-with-preview"},{"type":"WEB","url":"https://github.com/johndatserakis/file-upload-with-preview/blob/develop/src/file-upload-with-preview.js%23L168"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-JS-FILEUPLOADWITHPREVIEW-1579492"}],"affected":[{"package":{"name":"file-upload-with-preview","ecosystem":"npm","purl":"pkg:npm/file-upload-with-preview"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.2.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/09/GHSA-97pv-4338-r5vp/GHSA-97pv-4338-r5vp.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N"}]}