GHSA-2m6g-crv8-p3c6

Suggest an improvement
Source
https://github.com/advisories/GHSA-2m6g-crv8-p3c6
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/09/GHSA-2m6g-crv8-p3c6/GHSA-2m6g-crv8-p3c6.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-2m6g-crv8-p3c6
Aliases
Published
2022-09-16T21:17:44Z
Modified
2023-12-06T00:47:27.335754Z
Severity
  • 8.6 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N CVSS Calculator
Summary
Parse Server vulnerable to brute force guessing of user sensitive data via search patterns
Details

Impact

Internal fields (keys used internally by Parse Server, prefixed by _) and protected fields (user defined) can be used as query constraints. Internal and protected fields are removed by Parse Server from query results and are only returned to the client using a valid master key. However, using query constraints, these fields can be guessed by enumerating until Parse Server returns a response object.

Patches

The patch requires the master key to use internal and protected fields as query constraints.

Workarounds

Implement a Parse Cloud Trigger beforeFind and manually remove the query constraints, such as:

Parse.Cloud.beforeFind('TestObject', ({ query }) => {
  for (const key in query._where || []) {
    // Repeat logic for protected fields
    if (key.charAt(0) === '_') {
      delete query._where[key];
    }
  }
});

References

  • https://github.com/parse-community/parse-server/security/advisories/GHSA-2m6g-crv8-p3c6
Database specific
{
    "nvd_published_at": "2022-09-07T21:15:00Z",
    "github_reviewed_at": "2022-09-16T21:17:44Z",
    "severity": "HIGH",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-200"
    ]
}
References

Affected packages

npm / parse-server

Package

Affected ranges

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

npm / parse-server

Package

Affected ranges

Type
SEMVER
Events
Introduced
5.0.0
Fixed
5.2.5