Security readout for executives and security teams
Plain-English summary
CVE-2021-23439 is a browser-side XSS issue in file-upload-with-preview before 4.2.0. A user must be tricked into uploading a file with malicious JavaScript in its name, which may then run when the filename is displayed.
Executive priority
Treat as a medium-priority remediation for web applications with upload previews. It is not shown as actively exploited, but XSS can affect user trust and session integrity when upload features are exposed.
Technical view
The vulnerable package appears to render uploaded filenames without sufficient escaping, enabling script execution from a crafted filename. The CVSS 3.1 score is 4.2 with high attack complexity and required user interaction, causing limited confidentiality and integrity impact.
Likely exposure
Exposure is likely limited to applications using file-upload-with-preview before 4.2.0 and displaying uploaded filenames in the browser. Public-facing upload workflows raise concern, but exploitation still depends on user interaction.
Exploitation context
The bundle does not show CISA KEV listing or cited evidence of active exploitation. The published vector requires network reachability, no privileges, high complexity, and a user being tricked into uploading a maliciously named file.
Researcher notes
The key evidence identifies the affected npm package and versions before 4.2.0. CWE data is absent in the bundle. Focus validation on dependency presence, filename rendering paths, and whether untrusted names reach DOM HTML sinks.
Mitigation direction
- Upgrade file-upload-with-preview to version 4.2.0 or later.
- Confirm dependency lockfiles do not pin a vulnerable version.
- Review vendor guidance if an immediate upgrade is not possible.
- Ensure uploaded filenames are escaped before browser rendering.
- Restrict risky upload workflows where practical until upgraded.
Validation and detection
- Check application dependency manifests for file-upload-with-preview versions before 4.2.0.
- Use SCA results to confirm the vulnerable package is absent.
- Review upload preview UI code for unsafe filename rendering.
- Test controlled filename escaping with harmless special characters only.
- Confirm deployed builds use the remediated dependency version.
Public sources used
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
CVE-2021-23439 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
Open ATT&CK lookup- Severity
- Medium
- CVSS
- 4.2 (3.1)
- Known Exploited
- No
- Published
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P
CNA and ADP enrichment extracted from CVE v5
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
CVSS vector scores
1 official scoreWe collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P1.62.5Primary CVE scoreVulnerability scoring details
Base CVSS 3.1 score
4.2MediumVector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P
Source materials
- CVE List V5 sourceCVE List V5
- https://snyk.io/vuln/SNYK-JS-FILEUPLOADWITHPREVIEW-1579492CVE reference · x_refsource_MISC
- https://github.com/johndatserakis/file-upload-with-preview/blob/develop/src/file-upload-with-preview.js%23L168CVE reference · x_refsource_MISC
- https://github.com/johndatserakis/file-upload-with-preview/pull/40/files?file-filters%5B%5D=.js&hide-deleted-files=true%23diff-fe47b243de17419c0daa22cd785cd754baed60cf3679d3da1d6fe006f9f4a7f0R174CVE reference · x_refsource_MISC
Products and packages named in the record
CWE details
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
