CVE-2024-31453: PsiTransfer Violation Of The Integrity Of Vulnerability

MODERATE
Advisory Identifier: GHSA-xg8v-m2mh-45m6
CVSS 6.5
CWE-434
Published
Advisory Summary

CVE-2024-31453 is a MODERATE (CVSS 6.5) violation of the integrity of vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting PsiTransfer libraries in the npm ecosystem. The issue involves violation of the integrity of file distribution. Remediation is available by upgrading affected packages to version 2.2.0.

CVE-2024-31453 at a Glance

CVE Identifier CVE-2024-31453
GHSA Identifier GHSA-xg8v-m2mh-45m6
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product PsiTransfer
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:N/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 None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-31453

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.2.0
npm install psitransfer@2.2.0
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 CVE-2024-31453, 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.2.0), 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-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. 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** 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. <img width="1434" alt="Снимок экрана 2024-03-17 в 21 27 30" src="https://github.com/psi-4ward/psitransfer/assets/163760990/4634a6f7-6e7d-486e-9929-76156aaa1340"> 2. Go to the link address (id of the file distribution is needed by an attacker to upload files there). <img width="1426" alt="Снимок экрана 2024-03-17 в 21 27 35" src="https://github.com/psi-4ward/psitransfer/assets/163760990/a57c910c-69e2-4b07-985d-b0a46c69891a"> 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. <img width="1403" alt="Снимок экрана 2024-03-17 в 21 28 09" src="https://github.com/psi-4ward/psitransfer/assets/163760990/8b839fb8-2c0b-432f-8503-e4c42a840056"> 5. Send a PATCH /files/{{id}} request with arbitrary content in the request body. Id is taken from the previous step. <img width="1067" alt="Снимок экрана 2024-03-17 в 21 28 51" src="https://github.com/psi-4ward/psitransfer/assets/163760990/c5b2acf3-fdf1-4780-8c63-61a7f19338df"> Result: <img width="1432" alt="Снимок экрана 2024-03-17 в 21 29 05" src="https://github.com/psi-4ward/psitransfer/assets/163760990/c49b17c8-e1d2-4894-b6e2-f50b9663fca7"> <img width="1424" alt="Снимок экрана 2024-03-17 в 21 29 15" src="https://github.com/psi-4ward/psitransfer/assets/163760990/e4a1e07d-3e77-4f61-a4e7-ceee4a5a7b8e"> **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.

CVE-2024-31453 Affected PsiTransfer Versions

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

References

Frequently Asked Questions

What is CVE-2024-31453?
CVE-2024-31453 is a security vulnerability in PsiTransfer involving Violation of the integrity of file distribution under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which PsiTransfer versions are affected?
Affected versions include releases prior to 2.2.0 across affected packages: psitransfer.
What version fixes CVE-2024-31453?
Upgrading to 2.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is psitransfer affected?
Yes, psitransfer is affected in releases prior to 2.2.0. Upgrade your dependency to 2.2.0 or later.
What is the CVSS score of CVE-2024-31453?
CVE-2024-31453 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2024-31453?
CVE-2024-31453 is classified under CWE-434: Unrestricted Upload of File with Dangerous Type (The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.).
How can I check npm dependencies for CVE-2024-31453?
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-xg8v-m2mh-45m6",
  "modified" : "2024-04-09T18:46:53Z",
  "published" : "2024-04-05T17:15:24Z",
  "aliases" : [ "CVE-2024-31453" ],
  "summary" : "PsiTransfer: Violation of the integrity of file distribution",
  "details" : "**Summary**\nThe 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.\n\n**Details**\nVulnerable endpoint: POST /files\n\n**PoC**\n1. Create a file distribution.\n<img width=\"1434\" alt=\"Снимок экрана 2024-03-17 в 21 27 30\" src=\"https://github.com/psi-4ward/psitransfer/assets/163760990/4634a6f7-6e7d-486e-9929-76156aaa1340\">\n\n2. Go to the link address (id of the file distribution is needed by an attacker to upload files there).\n<img width=\"1426\" alt=\"Снимок экрана 2024-03-17 в 21 27 35\" src=\"https://github.com/psi-4ward/psitransfer/assets/163760990/a57c910c-69e2-4b07-985d-b0a46c69891a\">\n\n3. 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.\n<img width=\"1403\" alt=\"Снимок экрана 2024-03-17 в 21 28 09\" src=\"https://github.com/psi-4ward/psitransfer/assets/163760990/8b839fb8-2c0b-432f-8503-e4c42a840056\">\n\n5. Send a PATCH /files/{{id}} request with arbitrary content in the request body. Id is taken from the previous step.\n<img width=\"1067\" alt=\"Снимок экрана 2024-03-17 в 21 28 51\" src=\"https://github.com/psi-4ward/psitransfer/assets/163760990/c5b2acf3-fdf1-4780-8c63-61a7f19338df\">\n\nResult:\n<img width=\"1432\" alt=\"Снимок экрана 2024-03-17 в 21 29 05\" src=\"https://github.com/psi-4ward/psitransfer/assets/163760990/c49b17c8-e1d2-4894-b6e2-f50b9663fca7\">\n<img width=\"1424\" alt=\"Снимок экрана 2024-03-17 в 21 29 15\" src=\"https://github.com/psi-4ward/psitransfer/assets/163760990/e4a1e07d-3e77-4f61-a4e7-ceee4a5a7b8e\">\n\n**Impact**\nThe 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "psitransfer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/psi-4ward/psitransfer/security/advisories/GHSA-xg8v-m2mh-45m6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-31453"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/psi-4ward/psitransfer/commit/b9853c97e6911e1c1c5341245ca1eb363fda5269"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/psi-4ward/psitransfer"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-434" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-05T17:15:24Z",
    "nvd_published_at" : "2024-04-09T18:15:09Z"
  }
}