CVE-2023-35167: Remult Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-7hh3-3x64-v2g9
CVSS 5.0
CWE-284
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2023-35167
GHSA Identifier GHSA-7hh3-3x64-v2g9
Severity MODERATE
CVSS v3.1 Base Score 5.0
CWE Classification CWE-284: Improper Access Control
Affected Product Remult
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (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.

remult fixed: 0.20.6
npm install remult@0.20.6
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 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

### Impact If 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. ### Patches The issue is fixed in version 0.20.6 ### Workarounds Set the `apiPrefilter` option to a filter object instead of a function. ### References If you're using a minor version < 0.20 and require a patch, please create an issue.

CVE-2023-35167 Affected Remult Versions

1 component(s)
Fixed Versions:
0.20.6
Product / Package Ecosystem Affected Versions Fixed Version
remult
npm
< 0.20.6
0.20.6

References

Frequently Asked Questions

What is CVE-2023-35167?
CVE-2023-35167 is a security vulnerability in Remult involving When setting EntityOptions.apiPrefilter to a function, the filter is not applied to API requests for a resource by Id under CWE-284: Improper Access Control.
Which Remult versions are affected?
Affected versions include releases prior to 0.20.6 across affected packages: remult.
What version fixes CVE-2023-35167?
Upgrading to 0.20.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is remult affected?
Yes, remult is affected in releases prior to 0.20.6. Upgrade your dependency to 0.20.6 or later.
What is the CVSS score of CVE-2023-35167?
CVE-2023-35167 has a CVSS v3.1 base score of 5.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2023-35167?
CVE-2023-35167 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check npm dependencies for CVE-2023-35167?
Run the dependency tree command: 'npm ls remult'. 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-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"
  }
}