CVE-2023-41058: Parse server Trigger `beforeFind` Not Invoked Vulnerability

HIGH
Advisory Identifier: GHSA-fcv6-fg5r-jm9q
CVSS 7.5
CWE-670
Published
Advisory Summary

CVE-2023-41058 is a HIGH (CVSS 7.5) trigger `beforefind` not invoked vulnerability (CWE-670: Always-Incorrect Control Flow Implementation) affecting Parse server libraries in the npm ecosystem. The issue involves trigger `beforefind` not invoked in internal query pipeline when fetching pointer. Remediation is available by upgrading affected packages to version 5.5.5, 6.2.2.

CVE-2023-41058 at a Glance

CVE Identifier CVE-2023-41058
GHSA Identifier GHSA-fcv6-fg5r-jm9q
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-670: Always-Incorrect Control Flow Implementation
Affected Product Parse server
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2023-41058

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: 5.5.5
npm install parse-server@5.5.5
parse-server fixed: 6.2.2
npm install parse-server@6.2.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-2023-41058, 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 5.5.5), 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-670: Always-Incorrect Control Flow Implementation, where the code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated. 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 A Parse Pointer can be used to access internal Parse Server classes. It can also be used to circumvent the `beforeFind` query trigger which can be an additional vulnerability for deployments where the `beforeFind` trigger is used as a security layer to modify an incoming query. ### Patches The vulnerability was fixed by implementing a patch in the internal query pipeline to prevent a Parse Pointer to be used to access internal Parse Server classes or circumvent the `beforeFind` trigger. ### Workarounds There is no known workaround to prevent a Parse Pointer to be used to access internal Parse Server classes. A workaround if a `beforeFind` trigger is used as a security layer is to instead use the Parse Server provided [security layers](https://docs.parseplatform.org/parse-server/guide/#security) to manage access levels with Class-Level Permissions and Object-Level Access Control. ### References - GitHub security advisory: https://github.com/parse-community/parse-server/security/advisories/GHSA-fcv6-fg5r-jm9q - Patched in Parse Server 6.x: https://github.com/parse-community/parse-server/releases/tag/6.2.2 - Patched in Parse Server 5.x (LTS): https://github.com/parse-community/parse-server/releases/tag/5.5.5

CVE-2023-41058 Affected Parse server Versions

2 component(s)
Fixed Versions:
5.5.56.2.2
Product / Package Ecosystem Affected Versions Fixed Version
parse-server
npm
≥ 1.0.0
< 5.5.5
5.5.5
parse-server
npm
≥ 6.0.0
< 6.2.2
6.2.2

References

Frequently Asked Questions

What is CVE-2023-41058?
CVE-2023-41058 is a security vulnerability in Parse server involving Trigger `beforeFind` not invoked in internal query pipeline when fetching pointer under CWE-670: Always-Incorrect Control Flow Implementation.
Which Parse server versions are affected?
Affected versions include releases prior to 5.5.5, 6.2.2 across affected packages: parse-server.
What version fixes CVE-2023-41058?
Upgrading to 5.5.5, 6.2.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 5.5.5, 6.2.2. Upgrade your dependency to 5.5.5, 6.2.2 or later.
What is the CVSS score of CVE-2023-41058?
CVE-2023-41058 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2023-41058?
CVE-2023-41058 is classified under CWE-670: Always-Incorrect Control Flow Implementation (The code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated.).
How can I check npm dependencies for CVE-2023-41058?
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-fcv6-fg5r-jm9q",
  "modified" : "2023-09-04T22:40:41Z",
  "published" : "2023-09-04T22:40:41Z",
  "aliases" : [ "CVE-2023-41058" ],
  "summary" : "Trigger `beforeFind` not invoked in internal query pipeline when fetching pointer",
  "details" : "### Impact\n\nA Parse Pointer can be used to access internal Parse Server classes. It can also be used to circumvent the `beforeFind` query trigger which can be an additional vulnerability for deployments where the `beforeFind` trigger is used as a security layer to modify an incoming query.\n\n### Patches\n\nThe vulnerability was fixed by implementing a patch in the internal query pipeline to prevent a Parse Pointer to be used to access internal Parse Server classes or circumvent the `beforeFind` trigger.\n\n### Workarounds\n\nThere is no known workaround to prevent a Parse Pointer to be used to access internal Parse Server classes. A workaround if a `beforeFind` trigger is used as a security layer is to instead use the Parse Server provided [security layers](https://docs.parseplatform.org/parse-server/guide/#security) to manage access levels with Class-Level Permissions and Object-Level Access Control.\n\n### References\n\n- GitHub security advisory: https://github.com/parse-community/parse-server/security/advisories/GHSA-fcv6-fg5r-jm9q\n- Patched in Parse Server 6.x: https://github.com/parse-community/parse-server/releases/tag/6.2.2\n- Patched in Parse Server 5.x (LTS): https://github.com/parse-community/parse-server/releases/tag/5.5.5",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "5.5.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.2.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/security/advisories/GHSA-fcv6-fg5r-jm9q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-41058"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/commit/be4c7e23c63a2fb690685665cebed0de26be05c5"
  }, {
    "type" : "WEB",
    "url" : "https://docs.parseplatform.org/parse-server/guide/#security"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/parse-community/parse-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/releases/tag/5.5.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parse-community/parse-server/releases/tag/6.2.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-670" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-09-04T22:40:41Z",
    "nvd_published_at" : "2023-09-04T23:15:47Z"
  }
}