{"id":"GHSA-7hh3-3x64-v2g9","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 \u003c 0.20 and require a patch, please create an issue.","aliases":["CVE-2023-35167"],"modified":"2026-09-10T03:49:53.848594269Z","published":"2023-06-20T18:50:15Z","database_specific":{"github_reviewed_at":"2023-06-20T18:50:15Z","nvd_published_at":"2023-06-23T20:15:09Z","cwe_ids":["CWE-284"],"severity":"MODERATE","github_reviewed":true},"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"}],"affected":[{"package":{"name":"remult","ecosystem":"npm","purl":"pkg:npm/remult"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.20.6"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/06/GHSA-7hh3-3x64-v2g9/GHSA-7hh3-3x64-v2g9.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L"}]}