GHSA-7hh3-3x64-v2g9

Suggest an improvement
Source
https://github.com/advisories/GHSA-7hh3-3x64-v2g9
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/06/GHSA-7hh3-3x64-v2g9/GHSA-7hh3-3x64-v2g9.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-7hh3-3x64-v2g9
Aliases
Published
2023-06-20T18:50:15Z
Modified
2026-09-10T03:49:53Z
Severity
  • 5.0 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L CVSS Calculator
Summary
When setting EntityOptions.apiPrefilter to a function, the filter is not applied to API requests for a resource by Id
Details

Impact

If you used the 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.

Database specific
{
    "cwe_ids":  [
        "CWE-284"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2023-06-20T18:50:15Z",
    "nvd_published_at":  "2023-06-23T20:15:09Z",
    "severity":  "MODERATE"
}
References

Affected packages

npm / remult

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
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"