CVE-2020-5251: Parse server Information Disclosure Vulnerability

HIGH
Advisory Identifier: GHSA-h4mf-75hf-67w4
CVSS 7.7
CWE-285 CWE-200
Published
Advisory Summary

CVE-2020-5251 is a HIGH (CVSS 7.7) information disclosure vulnerability (CWE-285: Improper Authorization) affecting Parse server libraries in the npm ecosystem. The issue involves information disclosure in parse-server. Remediation is available by upgrading affected packages to version 4.1.0.

CVE-2020-5251 at a Glance

CVE Identifier CVE-2020-5251
GHSA Identifier GHSA-h4mf-75hf-67w4
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-285: Improper Authorization
Affected Product Parse server
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.7

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

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

How to Fix CVE-2020-5251

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.1.0
npm install parse-server@4.1.0
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-2020-5251, 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.1.0), 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. 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

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 2. 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.

CVE-2020-5251 Affected Parse server Versions

1 component(s)
Fixed Versions:
4.1.0
Product / Package Ecosystem Affected Versions Fixed Version
parse-server
npm
< 4.1.0
4.1.0

References

Frequently Asked Questions

What is CVE-2020-5251?
CVE-2020-5251 is a security vulnerability in Parse server involving Information disclosure in parse-server under CWE-285: Improper Authorization.
Which Parse server versions are affected?
Affected versions include releases prior to 4.1.0 across affected packages: parse-server.
What version fixes CVE-2020-5251?
Upgrading to 4.1.0 (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.1.0. Upgrade your dependency to 4.1.0 or later.
What is the CVSS score of CVE-2020-5251?
CVE-2020-5251 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2020-5251?
CVE-2020-5251 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check npm dependencies for CVE-2020-5251?
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-h4mf-75hf-67w4",
  "modified" : "2021-01-08T20:27:29Z",
  "published" : "2020-03-04T20:20:27Z",
  "aliases" : [ "CVE-2020-5251" ],
  "summary" : "Information disclosure in parse-server",
  "details" : "1. you can fetch all the users' objects, by using regex in the NoSQL query.\nUsing the NoSQL, you can use a regex on sessionToken `(\"_SessionToken\":{\"$regex\":\"r:027f\"}}` and find valid accounts this way.\n\nUsing this method, it's possible to retrieve accounts without interaction from the users.\n\nGET /parse/users/me HTTP/1.1\n```\n{\n  \"_ApplicationId\": \"appName\",\n  \"_JavaScriptKey\": \"javascriptkey\",\n  \"_ClientVersion\": \"js2.10.0\",\n  \"_InstallationId\": \"ca713ee2-6e60-d023-a8fe-14e1bfb2f300\",\n  \"_SessionToken\": {\n    \"$regex\": \"r:5\"\n  }\n}\n```\nWhen trying it with an update query the same thing luckily doesn't seem to work:\nPOST /parse/classes/_User/PPNk59jPPZ\n\n2. There is another similar vulnerability in verify email and the request password reset.\n\nIf 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`\n\nThe same thing can be done for reset password: `http://localhost:1337/parse/apps/kickbox/request_password_reset?token[$regex]=a&username=some@email.com`\n\nYou 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.1.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.0.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/security/advisories/GHSA-h4mf-75hf-67w4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5251"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/commit/3a3a5eee5ffa48da1352423312cb767de14de269"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-285" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-03-04T19:54:37Z",
    "nvd_published_at" : null
  }
}