Description
PsiTransfer is an open source, self-hosted file sharing solution. Prior to version 2.4.3, the upload PATCH flow under `/files/:uploadId` validates the mounted request path using the still-encoded `req.path`, but the downstream tus handler later writes using the decoded `req.params.uploadId`. In deployments that use a supported custom `PSITRANSFER_UPLOAD_DIR` whose basename prefixes a startup-loaded JavaScript path, such as `conf`, an unauthenticated attacker can create `config.<NODE_ENV>.js` in the application root. The attacker-controlled file is then executed on the next process restart. Version 2.4.3 contains a patch.
Problem types
CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Product status
References
github.com/...ansfer/security/advisories/GHSA-533q-w4g6-5586
github.com/...ansfer/security/advisories/GHSA-533q-w4g6-5586
github.com/...ommit/8b547bf3e09757122efa00aab90281e3915aa0c6
github.com/psi-4ward/psitransfer/releases/tag/v2.4.3