CVE-2022-39313: Parse server Parse-server Crashes When Receiving File Vulnerability

HIGH
Advisory Identifier: GHSA-h423-w6qv-2wj3
CVSS 7.5
CWE-1284 CWE-20
Published
Advisory Summary

CVE-2022-39313 is a HIGH (CVSS 7.5) parse-server crashes when receiving file vulnerability (CWE-1284: Improper Validation of Specified Quantity in Input) affecting Parse server libraries in the npm ecosystem. The issue involves parse-server crashes when receiving file download request with invalid byte range. Remediation is available by upgrading affected packages to version 4.10.17, 5.2.8.

CVE-2022-39313 at a Glance

CVE Identifier CVE-2022-39313
GHSA Identifier GHSA-h423-w6qv-2wj3
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-1284: Improper Validation of Specified Quantity in Input
Affected Product Parse server
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.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:N/S:U/C:N/I:N/A:H).

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

How to Fix CVE-2022-39313

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

parse-server fixed: 4.10.17
npm install parse-server@4.10.17
parse-server fixed: 5.2.8
npm install parse-server@5.2.8
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 parse-server

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2022-39313, inspect your project dependencies using npm:

npm ls parse-server

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

Note: The npm ls parse-server 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-1284: Improper Validation of Specified Quantity in Input, where the product receives input that is expected to specify a quantity (such as size or length), but it does not validate or incorrectly validates that the quantity has the required properties. In Parse server, 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

### Impact Parse Server crashes when a file download request is received with an invalid byte range. ### Patches Improved parsing of the range parameter to properly handle invalid range requests. ### Workarounds None ### References - [GHSA-h423-w6qv-2wj3](https://github.com/parse-community/parse-server/security/advisories/GHSA-h423-w6qv-2wj3)

CVE-2022-39313 Affected Parse server Versions

2 component(s)
Fixed Versions:
4.10.175.2.8
Product / Package Ecosystem Affected Versions Fixed Version
parse-server
npm
< 4.10.17
4.10.17
parse-server
npm
≥ 5.0.0
< 5.2.8
5.2.8

References

Frequently Asked Questions

What is CVE-2022-39313?
CVE-2022-39313 is a security vulnerability in Parse server involving parse-server crashes when receiving file download request with invalid byte range under CWE-1284: Improper Validation of Specified Quantity in Input.
Which Parse server versions are affected?
Affected versions include releases prior to 4.10.17, 5.2.8 across affected packages: parse-server.
What version fixes CVE-2022-39313?
Upgrading to 4.10.17, 5.2.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is parse-server affected?
Yes, parse-server is affected in releases prior to 4.10.17, 5.2.8. Upgrade your dependency to 4.10.17, 5.2.8 or later.
What is the CVSS score of CVE-2022-39313?
CVE-2022-39313 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2022-39313?
CVE-2022-39313 is classified under CWE-1284: Improper Validation of Specified Quantity in Input (The product receives input that is expected to specify a quantity (such as size or length), but it does not validate or incorrectly validates that the quantity has the required properties.).
How can I check npm dependencies for CVE-2022-39313?
Run the dependency tree command: 'npm ls parse-server'. 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-h423-w6qv-2wj3",
  "modified" : "2022-10-18T16:08:49Z",
  "published" : "2022-10-18T16:08:49Z",
  "aliases" : [ "CVE-2022-39313" ],
  "summary" : "parse-server crashes when receiving file download request with invalid byte range",
  "details" : "### Impact\n\nParse Server crashes when a file download request is received with an invalid byte range.\n\n### Patches\n\nImproved parsing of the range parameter to properly handle invalid range requests.\n\n### Workarounds\n\nNone\n\n### References\n\n- [GHSA-h423-w6qv-2wj3](https://github.com/parse-community/parse-server/security/advisories/GHSA-h423-w6qv-2wj3)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.10.17"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.2.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/security/advisories/GHSA-h423-w6qv-2wj3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39313"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/commit/066f29673ab4030b6b5b90c0c0326f7d3fe7612a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/commit/3d7a61ecd5231638f01ff1a965b6313043c594a7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/parse-community/parse-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/releases/tag/4.10.17"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1284", "CWE-20" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-10-18T16:08:49Z",
    "nvd_published_at" : "2022-10-24T14:15:00Z"
  }
}