CVE-2024-31453: PsiTransfer: Violation of the integrity of file distribution
6.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.35137%
CWE
Published
4/5/2024
Updated
4/9/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| psitransfer | npm | < 2.2.0 | 2.2.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the middleware handling file uploads at /files endpoint. The commit diff shows the patch added an async check (store.info(fid)) to verify if upload is still partial. Before this fix, the function didn't validate() if the target distribution had already completed its upload process, allowing attackers to inject new files by specifying existing distribution IDs. The vulnerable code path is clearly in the request handler for POST/PATCH methods on the /files route, which was modified in the patch to add the restriction.