{"id":"CVE-2021-23439","published":"2021-09-05T14:10:11Z","modified":"2024-09-16T18:56:03Z","title":"Cross-site Scripting (XSS)","vendor":null,"product":null,"tier":"tail","description":{"text":"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).","provenance":"source","from":"CVE.org"},"cvss":{"score":4.2,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00893,"percentile":0.60307,"provenance":"source"},"cwes":[],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-FILEUPLOADWITHPREVIEW-1579492","tags":["x_refsource_MISC"]},{"url":"https://github.com/johndatserakis/file-upload-with-preview/blob/develop/src/file-upload-with-preview.js%23L168","tags":["x_refsource_MISC"]},{"url":"https://github.com/johndatserakis/file-upload-with-preview/pull/40/files?file-filters%5B%5D=.js&hide-deleted-files=true%23diff-fe47b243de17419c0daa22cd785cd754baed60cf3679d3da1d6fe006f9f4a7f0R174","tags":["x_refsource_MISC"]}],"priority":{"score":15.0,"factors":[{"name":"EPSS percentile","points":12.06},{"name":"CVSS severity","points":2.94}]},"affectedVersions":[{"vendor":"n/a","product":"file-upload-with-preview","versions":[">= unspecified, < 4.2.0"]}],"affected":[{"ecosystem":"npm","package":"file-upload-with-preview","vulnerableRanges":["<4.2.0"],"patched":["4.2.0"],"from":["GHSA-97pv-4338-r5vp"],"provenance":"source"}],"summary":{"text":"The flaw is a Cross-site Scripting (XSS) vulnerability in the file-upload-with-preview package, affecting versions before 4.2.0, where file names are not sanitised and can carry malicious JavaScript. An unauthenticated remote attacker can exploit it by tricking a user into uploading a file with a crafted name, with exploitation requiring a high-complexity attack and user interaction, and it impacts confidentiality and integrity while availability is unaffected.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:37:28Z"},"euvd":{"id":"EUVD-2021-2022","exploited":false,"provenance":"source"}}