CVE-2025-23061Mongoosejs Mongoose
Critical 9.8 No auth needed
Follow: this CVE · Mongoosejs · Mongoosejs Mongoose We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- —
- Auth required
- No
- Published
- Jan 15, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-94
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
Mongoose before 8.9.5 can improperly use a nested $where filter with a populate() match, leading to search injection. NOTE: this issue exists because of an incomplete fix for CVE-2024-53900.
What to do
- Apply the vendor's security update for Mongoose.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | mongoose |
≥ 8.0.0-rc0 < 8.9.5 |
8.9.5 |
npm install mongoose@8.9.5 |
| npm | mongoose |
≥ 7.0.0-rc0 < 7.8.4 |
7.8.4 |
npm install mongoose@7.8.4 |
| npm | mongoose |
< 6.13.6 |
6.13.6 |
npm install mongoose@6.13.6 |
Per OSV / GitHub Advisories (GHSA-vg7j-7cwx-8wgw). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| mongoosejs | mongoose | < 6.13.6 |
| mongoosejs | mongoose | ≥ 7.0.0 < 7.8.4 |
| mongoosejs | mongoose | ≥ 8.0.0 < 8.9.5 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Release Notes
- github.com Patch
- github.com Release Notes
- www.npmjs.com Product