Intel

AIKIDO-2024-10481

mongoose is vulnerable to NoSQL Injection

NoSQL InjectionCVE-2024-53900

95

Critical Risk

This Affects:

jsmongoose
5.6.4 - 8.8.2
Fixed in 8.8.3

TL;DR

Affected versions of this package are vulnerable to NoSQL injection in the getModelsMapForPopulate function. This vulnerability allows attackers to exploit the $where clause within the match options, enabling them to execute arbitrary JavaScript code or manipulate database queries. This can lead to unauthorized data access, data manipulation, or potential denial of service, depending on the application's setup and the database permissions.

Who does this affect?

You are affected if you are using a version which is within vulnerability ranges

Background info

mongoose is vulnerable to NoSQL Injection in versions 5.6.4 - 8.8.2.

How to fix this

Upgrade the mongoose library to the patch version.