CVE-2022-39225: Parse server Parse-server's Session Object Properties Can Vulnerability
MODERATECVE-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
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).
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.
npm install parse-server@4.10.15
npm install parse-server@5.2.6
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
CVE-2022-39225 Affected Parse server Versions
2 component(s)| 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?
Which Parse server versions are affected?
What version fixes CVE-2022-39225?
Is parse-server affected?
What is the CVSS score of CVE-2022-39225?
What CWE is associated with CVE-2022-39225?
How can I check npm dependencies for CVE-2022-39225?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}