CVE-2023-41058: Parse server Trigger `beforeFind` Not Invoked Vulnerability
HIGHCVE-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
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).
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.
npm install parse-server@5.5.5
npm install parse-server@6.2.2
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
CVE-2023-41058 Affected Parse server Versions
2 component(s)| 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?
Which Parse server versions are affected?
What version fixes CVE-2023-41058?
Is parse-server affected?
What is the CVSS score of CVE-2023-41058?
What CWE is associated with CVE-2023-41058?
How can I check npm dependencies for CVE-2023-41058?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}