Description
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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| mongoosejs | Mongoose | 6.0.0 – < 6.13.6, 7.0.0 – < 7.8.4, 8.0.0 – < 8.9.5 | 6.13.6 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 2 repositories
-
amikanev/CVE-2025-23061-LAB ★ 0 · Apr 6, 2026
-
open-flaw/CVE-2025-23061 ★ 0 · Dec 11, 2025
CVE-2025-23061 - Mongoose Command Injection
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- Mongoose - NoSQL Injection http/cves/2025/CVE-2025-23061.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | mongoose | >= 8.0.0-rc0, < 8.9.5 | 8.9.5 | GHSA-vg7j-7cwx-8wgw |
| npm | mongoose | >= 7.0.0-rc0, < 7.8.4 | 7.8.4 | GHSA-vg7j-7cwx-8wgw |
| npm | mongoose | < 6.13.6 | 6.13.6 | GHSA-vg7j-7cwx-8wgw |