HighGHSA-m7xq-9374-9rvxBIT-mongoose-2024-53900CVE-2024-53900
Mongoose search injection vulnerability
Published 2 Dec 2024 · Updated 5 Feb 2026
Affected packages
mongoosenpm
- Affected
- >=8.0.0-rc0 <8.8.3
- Fixed in
- 8.8.3
Update to the fixed version for your release line, for example:
npm install mongoose@8.8.3mongoosenpm
- Affected
- >=7.0.0-rc0 <7.8.3
- Fixed in
- 7.8.3
Update to the fixed version for your release line, for example:
npm install mongoose@7.8.3mongoosenpm
- Affected
- >=6.0.0-rc0 <6.13.5
- Fixed in
- 6.13.5
Update to the fixed version for your release line, for example:
npm install mongoose@6.13.5mongoosenpm
- Affected
- >=3.6.0-rc0 <5.13.23
- Fixed in
- 5.13.23
Update to the fixed version for your release line, for example:
npm install mongoose@5.13.23Details
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.
Is GHSA-m7xq-9374-9rvx in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected mongoose, and gives you the command that fixes it.
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2024-53900
- Linkgithub.com/github/advisory-database/pull/6769
- Linkgithub.com/github/advisory-database/pull/6776
- Linkgithub.com/Automattic/mongoose/commit/33679bcf8ca43d74e3e8ecd4cc224826772d805b
- Linkgithub.com/Automattic/mongoose/commit/bbb6fa7ecb44bbaf5bea955d886378a1247bce0b
- Linkgithub.com/Automattic/mongoose/commit/c9e86bff7eef477da75a29af62a06d41a835a156
- Packagegithub.com/Automattic/mongoose
- Linkgithub.com/Automattic/mongoose/blob/master/CHANGELOG.md
- Linkgithub.com/Automattic/mongoose/compare/6.13.4...6.13.5
- Linkgithub.com/Automattic/mongoose/compare/7.8.2...7.8.3
- Linkgithub.com/Automattic/mongoose/compare/8.8.2...8.8.3
- Linkgithub.com/Automattic/mongoose/releases
- Linkwww.npmjs.com/package/mongoose?activeTab=versions
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.