CVE-2020-5251: Parse server Information Disclosure Vulnerability
HIGHCVE-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
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).
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.
npm install parse-server@4.1.0
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
CVE-2020-5251 Affected Parse server Versions
1 component(s)| 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?
Which Parse server versions are affected?
What version fixes CVE-2020-5251?
Is parse-server affected?
What is the CVSS score of CVE-2020-5251?
What CWE is associated with CVE-2020-5251?
How can I check npm dependencies for CVE-2020-5251?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}