critical9.1
CVE-2024-53900
Mongoose search injection vulnerability
Impact
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.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| npm | mongoose | >= 8.0.0-rc0, < 8.8.3 | 8.8.3 |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Mongoosejs | Mongoose | before 6.13.5 from 7.0.1 before 7.8.3 from 8.0.1 before 8.8.3 Versions 7.0.0, 8.0.0 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md
- https://github.com/Automattic/mongoose/commit/c9e86bff7eef477da75a29af62a06d41a835a156
- https://github.com/Automattic/mongoose/releases
- https://github.com/advisories/GHSA-m7xq-9374-9rvx
- https://www.npmjs.com/package/mongoose?activeTab=versions
- https://nvd.nist.gov/vuln/detail/CVE-2024-53900
- https://github.com/Automattic/mongoose/commit/33679bcf8ca43d74e3e8ecd4cc224826772d805b
- https://github.com/Automattic/mongoose/compare/6.13.4...6.13.5
- https://github.com/Automattic/mongoose/compare/7.8.2...7.8.3
- https://github.com/Automattic/mongoose/compare/8.8.2...8.8.3
- https://github.com/github/advisory-database/pull/6769
- https://github.com/github/advisory-database/pull/6776
- https://github.com/Automattic/mongoose/commit/bbb6fa7ecb44bbaf5bea955d886378a1247bce0b