CVE-2022-41878: Parse server Parse Server Vulnerable To Prototype Vulnerability

HIGH
Advisory Identifier: GHSA-xprv-wvh7-qqqx
CVSS 7.2
CWE-1321
Published
Advisory Summary

CVE-2022-41878 is a HIGH (CVSS 7.2) parse server vulnerable to prototype vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Parse server libraries in the npm ecosystem. The issue involves parse server vulnerable to prototype pollution via cloud code webhooks or cloud code triggers. Remediation is available by upgrading affected packages to version 4.10.19, 5.3.2.

CVE-2022-41878 at a Glance

CVE Identifier CVE-2022-41878
GHSA Identifier GHSA-xprv-wvh7-qqqx
Severity HIGH
CVSS v3.1 Base Score 7.2
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Parse server
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.2

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

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

How to Fix CVE-2022-41878

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.10.19
npm install parse-server@4.10.19
parse-server fixed: 5.3.2
npm install parse-server@5.3.2
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-2022-41878, 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.10.19), 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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. 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

### Impact Keywords that are specified in the Parse Server option `requestKeywordDenylist` can be injected via Cloud Code Webhooks or Triggers. This will result in the keyword being saved to the database, bypassing the `requestKeywordDenylist` option. ### Patches Improved keyword detection. ### Workarounds Configure your firewall to only allow trusted servers to make request to the Parse Server Cloud Code Webhooks API, or block the API completely if you are not using the feature. ### Collaborators Mikhail Shcherbakov, Cristian-Alexandru Staicu and Musard Balliu working with Trend Micro Zero Day Initiative ### References - https://github.com/parse-community/parse-server/security/advisories/GHSA-xprv-wvh7-qqqx

CVE-2022-41878 Affected Parse server Versions

2 component(s)
Fixed Versions:
4.10.195.3.2
Product / Package Ecosystem Affected Versions Fixed Version
parse-server
npm
< 4.10.19
4.10.19
parse-server
npm
≥ 5.0.0
< 5.3.2
5.3.2

References

Frequently Asked Questions

What is CVE-2022-41878?
CVE-2022-41878 is a security vulnerability in Parse server involving Parse Server vulnerable to Prototype Pollution via Cloud Code Webhooks or Cloud Code Triggers under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Parse server versions are affected?
Affected versions include releases prior to 4.10.19, 5.3.2 across affected packages: parse-server.
What version fixes CVE-2022-41878?
Upgrading to 4.10.19, 5.3.2 (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.10.19, 5.3.2. Upgrade your dependency to 4.10.19, 5.3.2 or later.
What is the CVSS score of CVE-2022-41878?
CVE-2022-41878 has a CVSS v3.1 base score of 7.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-41878?
CVE-2022-41878 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check npm dependencies for CVE-2022-41878?
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-xprv-wvh7-qqqx",
  "modified" : "2023-08-21T18:16:54Z",
  "published" : "2022-11-09T20:47:27Z",
  "aliases" : [ "CVE-2022-41878" ],
  "summary" : "Parse Server vulnerable to Prototype Pollution via Cloud Code Webhooks or Cloud Code Triggers",
  "details" : "### Impact\n\nKeywords that are specified in the Parse Server option `requestKeywordDenylist` can be injected via Cloud Code Webhooks or Triggers. This will result in the keyword being saved to the database, bypassing the `requestKeywordDenylist` option.\n\n### Patches\n\nImproved keyword detection.\n\n### Workarounds\n\nConfigure your firewall to only allow trusted servers to make request to the Parse Server Cloud Code Webhooks API, or block the API completely if you are not using the feature.\n\n### Collaborators\n\nMikhail Shcherbakov, Cristian-Alexandru Staicu and Musard Balliu working with Trend Micro Zero Day Initiative\n\n### References\n- https://github.com/parse-community/parse-server/security/advisories/GHSA-xprv-wvh7-qqqx\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.10.19"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.3.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/security/advisories/GHSA-xprv-wvh7-qqqx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-41878"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/pull/8301"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/pull/8302"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/commit/0a2d412e265992d53a670011afd9d2578562adc3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/commit/6728da1e3591db1e27031d335d64d8f25546a06f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/parse-community/parse-server"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-09T20:47:27Z",
    "nvd_published_at" : "2022-11-10T23:15:00Z"
  }
}