CVE-2023-35167: Remult Remote Code Execution Vulnerability
MODERATECVE-2023-35167 is a MODERATE (CVSS 5.0) remote code execution vulnerability (CWE-284: Improper Access Control) affecting Remult libraries in the npm ecosystem. The issue involves when setting entityoptions.apiprefilter to a function, the filter is not applied to api requests for a resource by id. Remediation is available by upgrading affected packages to version 0.20.6.
CVE-2023-35167 at a Glance
Security Impact
CVSS: 5.0
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:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2023-35167
To remediate this vulnerability, upgrade all affected Remult 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 remult@0.20.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls remult
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-35167, inspect your project dependencies using npm:
npm ls remult
Analyze the terminal output to locate any version of Remult in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.20.6), your application is affected.
Note: The npm ls remult 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-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Remult, 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-35167 Affected Remult Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
remult
|
npm |
< 0.20.6
|
0.20.6
|
References
Frequently Asked Questions
What is CVE-2023-35167?
Which Remult versions are affected?
What version fixes CVE-2023-35167?
Is remult affected?
What is the CVSS score of CVE-2023-35167?
What CWE is associated with CVE-2023-35167?
How can I check npm dependencies for CVE-2023-35167?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7hh3-3x64-v2g9",
"modified" : "2023-06-26T13:55:41Z",
"published" : "2023-06-20T18:50:15Z",
"aliases" : [ "CVE-2023-35167" ],
"summary" : "When setting EntityOptions.apiPrefilter to a function, the filter is not applied to API requests for a resource by Id",
"details" : "### Impact\nIf you used the [apiPrefilter](https://remult.dev/docs/ref_entity.html#apiprefilter) option of the `@Entity` decorator, by setting it to a function that returns a filter that prevents unauthorized access to data, an attacker who knows the `id` of an entity instance she is not authorized to access, can gain read, update and delete access to it.\n\n### Patches\nThe issue is fixed in version 0.20.6\n\n### Workarounds\nSet the `apiPrefilter` option to a filter object instead of a function.\n\n### References\nIf you're using a minor version < 0.20 and require a patch, please create an issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "remult"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.20.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/remult/remult/security/advisories/GHSA-7hh3-3x64-v2g9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-35167"
}, {
"type" : "WEB",
"url" : "https://github.com/remult/remult/commit/6892ae97134126d8710ef7302bb2fc37730994c5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/remult/remult"
}, {
"type" : "WEB",
"url" : "https://github.com/remult/remult/releases/tag/v0.20.6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-284" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-20T18:50:15Z",
"nvd_published_at" : "2023-06-23T20:15:09Z"
}
}