CVE-2022-39225: Parse server Parse-server's Session Object Properties Can Vulnerability

MODERATE
Advisory Identifier: GHSA-6w4q-23cf-j9jp
CVSS 4.3
CWE-669 CWE-276
Published
Advisory Summary

CVE-2022-39225 is a MODERATE (CVSS 4.3) parse-server's session object properties can vulnerability (CWE-669: Incorrect Resource Transfer Between Spheres) affecting Parse server libraries in the npm ecosystem. The issue involves parse-server's session object properties can be updated by foreign user if object id is known. Remediation is available by upgrading affected packages to version 4.10.15, 5.2.6.

CVE-2022-39225 at a Glance

CVE Identifier CVE-2022-39225
GHSA Identifier GHSA-6w4q-23cf-j9jp
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-669: Incorrect Resource Transfer Between Spheres
Affected Product Parse server
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.3

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

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

How to Fix CVE-2022-39225

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.15
npm install parse-server@4.10.15
parse-server fixed: 5.2.6
npm install parse-server@5.2.6
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-39225, 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.15), 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-669: Incorrect Resource Transfer Between Spheres, where the product does not properly transfer a resource/behavior to another sphere, or improperly imports a resource/behavior from another sphere, in a manner that provides unintended control over that resource. 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 A foreign user can write to the session object of another user if the session object ID is known. For example, a foreign user can assign the session object to their own user by writing to the `user` field and then read any custom fields of that session object. Note that assigning a session to a foreign user does not usually change the privileges of neither of the two users, according to how Parse Server uses session objects internally. However, if custom logic is used to relate specific session objects to privileges this vulnerability may have a higher level of severity. The vulnerability does not allow a foreign user to assign a session object to themselves, read the session token, and then reassign the session object to the original user to then authenticate as that user with the known session token. The vulnerability only exists for foreign session objects, a user cannot assign their own session to another user. While it is unlikely that the session object ID of another user is known, it is possible to brute-force guess an object ID, even though the attacker would not know to which user a successfully guessed session object ID belongs. ### Patches The fix prevents writing to foreign session objects, even if the session object ID is known. ### Workarounds Add a `beforeSave` trigger to the `_Session` class and prevent writing if the requesting user is different from the user in the session object. ### References - GitHub advisory [GHSA-6w4q-23cf-j9jp](https://github.com/parse-community/parse-server/security/advisories/GHSA-6w4q-23cf-j9jp)

CVE-2022-39225 Affected Parse server Versions

2 component(s)
Fixed Versions:
4.10.155.2.6
Product / Package Ecosystem Affected Versions Fixed Version
parse-server
npm
< 4.10.15
4.10.15
parse-server
npm
≥ 5.0.0
< 5.2.6
5.2.6

References

Frequently Asked Questions

What is CVE-2022-39225?
CVE-2022-39225 is a security vulnerability in Parse server involving parse-server's session object properties can be updated by foreign user if object ID is known under CWE-669: Incorrect Resource Transfer Between Spheres.
Which Parse server versions are affected?
Affected versions include releases prior to 4.10.15, 5.2.6 across affected packages: parse-server.
What version fixes CVE-2022-39225?
Upgrading to 4.10.15, 5.2.6 (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.15, 5.2.6. Upgrade your dependency to 4.10.15, 5.2.6 or later.
What is the CVSS score of CVE-2022-39225?
CVE-2022-39225 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2022-39225?
CVE-2022-39225 is classified under CWE-669: Incorrect Resource Transfer Between Spheres (The product does not properly transfer a resource/behavior to another sphere, or improperly imports a resource/behavior from another sphere, in a manner that provides unintended control over that resource.).
How can I check npm dependencies for CVE-2022-39225?
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-6w4q-23cf-j9jp",
  "modified" : "2022-09-21T18:32:01Z",
  "published" : "2022-09-21T18:32:01Z",
  "aliases" : [ "CVE-2022-39225" ],
  "summary" : "parse-server's session object properties can be updated by foreign user if object ID is known",
  "details" : "### Impact\n\nA foreign user can write to the session object of another user if the session object ID is known. For example, a foreign user can assign the session object to their own user by writing to the `user` field and then read any custom fields of that session object.\n\nNote that assigning a session to a foreign user does not usually change the privileges of neither of the two users, according to how Parse Server uses session objects internally. However, if custom logic is used to relate specific session objects to privileges this vulnerability may have a higher level of severity.\n\nThe vulnerability does not allow a foreign user to assign a session object to themselves, read the session token, and then reassign the session object to the original user to then authenticate as that user with the known session token. The vulnerability only exists for foreign session objects, a user cannot assign their own session to another user.\n\nWhile it is unlikely that the session object ID of another user is known, it is possible to brute-force guess an object ID, even though the attacker would not know to which user a successfully guessed session object ID belongs.\n\n### Patches\n\nThe fix prevents writing to foreign session objects, even if the session object ID is known.\n\n### Workarounds\n\nAdd a `beforeSave` trigger to the `_Session` class and prevent writing if the requesting user is different from the user in the session object.\n\n### References\n\n- GitHub advisory [GHSA-6w4q-23cf-j9jp](https://github.com/parse-community/parse-server/security/advisories/GHSA-6w4q-23cf-j9jp)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.10.15"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.2.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/security/advisories/GHSA-6w4q-23cf-j9jp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39225"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/commit/37fed3062ccc3ef1dfd49a9fc53318e72b3e4aff"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/parse-community/parse-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/releases/tag/4.10.15"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/releases/tag/5.2.6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-276", "CWE-669" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-09-21T18:32:01Z",
    "nvd_published_at" : "2022-09-23T07:15:00Z"
  }
}