GitHub Advisoryadvisory · npm
GHSA-xg8v-m2mh-45m6 PsiTransfer: Violation of the integrity of file distribution
MEDIUM
Official page ↗
- Aliases
- CVE-2024-31453
- Ecosystem
- npm
- Packages
- psitransfer
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
- Weaknesses
- CWE-434
- Reviewed
- 2024-04-05
Affected packages
• npm psitransfer: < 2.2.0 → fixed in 2.2.0
Description
Summary
The absence of restrictions on the endpoint, which allows you to create a path for uploading a file in a file distribution, allows an attacker to add arbitrary files to the distribution.
Details
Vulnerable endpoint: POST /files
PoC
1. Create a file distribution.
2. Go to the link address (id of the file distribution is needed by an attacker to upload files there).
3. Send a POST /files. As the value of the Upload-Metadata header we specify the sid parameter with the id of the file distribution obtained in the second step. In the response from the server in the Location header we get the path for uploading a new file to the file distribution.
5. Send a PATCH /files/{{id}} request with arbitrary content in the request body. Id is taken from the previous step.
Result:
Impact
The vulnerability allows an attacker to influence those users who come to the file distribution after him and slip the victim files with a malicious or phishing signature.
Related
Alias · CVE (1)
- CVE-2024-31453 PsiTransfer is an open source, self-hosted file sharing solution. vulnerability
Weakness · CWE (1)
- CWE-434 Unrestricted Upload of File with Dangerous Type weakness