Code injection in mongoosejs Mongoose
Priority MEDIUM 53CWE-94Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-94.
Summary
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.
Why it matters now
Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.07236 94th percentileScored 2026-11-07
Fix Fixed Mongoose (mongoosejs): 6.13.6, 7.8.4, 8.9.5mongoose (npm): 8.9.5, 7.8.4, 6.13.6
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| mongoosejs | Mongoose | 6.0.0 to before 6.13.6; 7.0.0 to before 7.8.4; 8.0.0 to before 8.9.5 | 6.13.6, 7.8.4, 8.9.5 | Patch available | CNA |
| — | mongoose (npm) | 8.0.0-rc0 to before 8.9.5 | 8.9.5 | Patch available | GHSA-vg7j-7cwx-8wgw |
| — | mongoose (npm) | 7.0.0-rc0 to before 7.8.4 | 7.8.4 | Patch available | GHSA-vg7j-7cwx-8wgw |
| — | mongoose (npm) | before 6.13.6 | 6.13.6 | Patch available | GHSA-vg7j-7cwx-8wgw |
- Mongoose Vendormongoosejs Affected 6.0.0 to before 6.13.6; 7.0.0 to before 7.8.4; 8.0.0 to before 8.9.5 Fixed in 6.13.6, 7.8.4, 8.9.5 Patch available CNA
- mongoose (npm) Vendor— Affected 8.0.0-rc0 to before 8.9.5 Fixed in 8.9.5 Patch available GHSA-vg7j-7cwx-8wgw
- mongoose (npm) Vendor— Affected 7.0.0-rc0 to before 7.8.4 Fixed in 7.8.4 Patch available GHSA-vg7j-7cwx-8wgw
- mongoose (npm) Vendor— Affected before 6.13.6 Fixed in 6.13.6 Patch available GHSA-vg7j-7cwx-8wgw
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:mongoosejs:mongoose:*:*:*:*:*:node.js:*:* | before 6.13.6; 7.0.0 to before 7.8.4; 8.0.0 to before 8.9.5 | Vulnerable | mongoosejs |
- cpe:2.3:a:mongoosejs:mongoose:*:*:*:*:*:node.js:*:* Versions before 6.13.6; 7.0.0 to before 7.8.4; 8.0.0 to before 8.9.5 Vulnerable ·mongoosejs
Remediation
- Fix · CNA Mongoose (mongoosejs) Fixed in 6.13.6, 7.8.4, 8.9.5
- Fix · GHSA-vg7j-7cwx-8wgw mongoose (npm) Fixed in 8.9.5 Advisory →
- Fix · GHSA-vg7j-7cwx-8wgw mongoose (npm) Fixed in 7.8.4 Advisory →
- Fix · GHSA-vg7j-7cwx-8wgw mongoose (npm) Fixed in 6.13.6 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-23061
- 2026-10-03 Alias added: GHSA-vg7j-7cwx-8wgw
References
Advisory 2
Other 9
- https://www.npmjs.com/package/mongoose?activeTab=versions
- https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md
- https://github.com/Automattic/mongoose/releases/tag/8.9.5
- https://github.com/Automattic/mongoose
- https://github.com/Automattic/mongoose/compare/6.13.5...6.13.6
- https://github.com/Automattic/mongoose/compare/7.8.3...7.8.4
- https://github.com/Automattic/mongoose/compare/8.9.4...8.9.5
- https://github.com/Automattic/mongoose/releases/tag/6.13.6
- https://github.com/Automattic/mongoose/releases/tag/7.8.4
More mongoosejs Mongoose vulnerabilities
- TI-2023-03453 Prototype Pollution in automattic/mongoose CVSS 3.1CRITICAL 9.8
- TI-2022-02368 Prototype Pollution in automattic/mongoose CVSS 3.1CRITICAL 9.8
- TI-2024-36076 Mongoose before 8.8.3 can improperly use $where in match, leading to search injection. CVSS 3.1CRITICAL 9.1
- TI-2019-13012 Automattic Mongoose through 5.7.4 allows attackers to bypass access control (in some… CVSS 3.1CRITICAL 9.1
- TI-2026-30638 Mongoose: Improper Sanitization of $nor in sanitizeFilter May Allow NoSQL Injection CVSS 3.1HIGH 7.5
Sources
- CVE-2025-23061 · CVE Program
- CVE-2025-23061 · NVD
- FIRST EPSS
- GHSA-vg7j-7cwx-8wgw · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences