Vulnerability library
Security checkNovember 09, 2023

When setting EntityOptions.apiPrefilter to a function, the filter is not applied to API requests for a resource by Id

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmremult

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

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.

Recommendation

Update the remult package to the latest compatible version. Followings are version details:

  • Affected version(s): < 0.20.6
  • Patched version(s): 0.20.6

References

Could your website be exposed too?

SmartScanner can check your website for When setting EntityOptions.apiPrefilter to a function, the filter is not applied to API requests for a resource by Id and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated November 09, 2023