{"id":"CVE-2021-23439","aliases":["EUVD-2021-2022","GHSA-97pv-4338-r5vp"],"status":"published","title":"Cross-site Scripting (XSS)","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).","severity":{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00893,"percentile":0.59918,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2021-09-05T14:10:11Z","modified":"2026-06-17T03:38:45Z","fixes":[{"ecosystem":"npm","package":"file-upload-with-preview","fixed_in":["4.2.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"file-upload-with-preview","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.2.0"}]}]},{"source":"osv","ecosystem":"npm","package":"file-upload-with-preview","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.2.0"}]}]}],"products":[{"vendor":"johndatserakis","product":"file-upload-with-preview"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-FILEUPLOADWITHPREVIEW-1579492","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://github.com/johndatserakis/file-upload-with-preview/blob/develop/src/file-upload-with-preview.js%23L168","tags":["x_refsource_MISC","x_transferred","Broken Link","web"]},{"url":"https://github.com/johndatserakis/file-upload-with-preview/pull/40/files?file-filters%5B%5D=.js\u0026hide-deleted-files=true%23diff-fe47b243de17419c0daa22cd785cd754baed60cf3679d3da1d6fe006f9f4a7f0R174","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23439","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-97pv-4338-r5vp"},{"url":"https://github.com/johndatserakis/file-upload-with-preview","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-23439","title":"Cross-site Scripting (XSS)","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).","status":"published","published":"2021-09-05T14:10:11.175Z","modified":"2024-09-16T18:56:03.367Z","cvss":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P","level":"medium","assessor":"cna"}],"updated_at":"2026-11-02T14:33:00.819444Z"}],"euvd":[{"id":"EUVD-2021-2022","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).","status":"published","published":"2021-09-05T14:10:11Z","modified":"2024-09-16T18:56:03Z","cvss":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P","level":"medium"}],"updated_at":"2026-11-03T00:55:27.571827Z"}],"ghsa":[{"id":"GHSA-97pv-4338-r5vp","title":"Cross-site Scripting in file-upload-with-preview","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).","status":"published","published":"2021-09-07T23:08:54Z","modified":"2023-02-01T05:06:06Z","cvss":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:36:37.441118Z"}],"nvd":[{"id":"CVE-2021-23439","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).","status":"published","published":"2021-09-05T14:15:07.37Z","modified":"2026-06-17T03:38:45.947Z","cvss":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium","assessor":"secondary"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:06:58.05696Z"}],"osv":[{"id":"GHSA-97pv-4338-r5vp","title":"Cross-site Scripting in file-upload-with-preview","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).","status":"published","published":"2021-09-07T23:08:54Z","modified":"2026-03-13T22:11:17.274119Z","cvss":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:43.524801Z"}]}}
