GHSA-6w4q-23cf-j9jp

Suggest an improvement
Source
https://github.com/advisories/GHSA-6w4q-23cf-j9jp
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/09/GHSA-6w4q-23cf-j9jp/GHSA-6w4q-23cf-j9jp.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-6w4q-23cf-j9jp
Aliases
Published
2022-09-21T18:32:01Z
Modified
2023-12-06T00:47:30.346008Z
Severity
  • 4.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
Summary
parse-server's session object properties can be updated by foreign user if object ID is known
Details

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

Database specific
{
    "nvd_published_at": "2022-09-23T07:15:00Z",
    "github_reviewed_at": "2022-09-21T18:32:01Z",
    "severity": "MODERATE",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-276",
        "CWE-669"
    ]
}
References

Affected packages

npm / parse-server

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.10.15

npm / parse-server

Package

Affected ranges

Type
SEMVER
Events
Introduced
5.0.0
Fixed
5.2.6