CVE-2024-53900
Npm vulnerability
Mongoose versions prior to 8.8.3, 7.8.3, 6.13.5, and 5.13.23 are vulnerable to improper use of the $where operator. This vulnerability arises from the ability of the $where clause to execute arbitrary JavaScript code in MongoDB queries, potentially leading to code injection attacks and unauthorized access or manipulation of database data.
High priority: this vulnerability is rated critical and can be attacked over the network without a login.
Affected products
Npm. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Npm runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- nvd.nist.gov/vuln/detail/CVE-2024-53900
- github.com/Automattic/mongoose/commit/c9e86bff7eef477da75a29af62a06d41a835a156
- github.com/Automattic/mongoose/blob/master/CHANGELOG.md
- github.com/Automattic/mongoose/releases
- www.npmjs.com/package/mongoose?activeTab=versions
- github.com/Automattic/mongoose/commit/33679bcf8ca43d74e3e8ecd4cc224826772d805b
- github.com/Automattic/mongoose/compare/6.13.4...6.13.5
- github.com/Automattic/mongoose/compare/7.8.2...7.8.3
- nvd.nist.gov/vuln/detail/CVE-2024-53900
- cve.org/CVERecord?id=CVE-2024-53900
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.