---
title: "CVE-2025-23061: Mongoose search injection vulnerability"
url: https://erroneo.us/security/cve/CVE-2025-23061/
description: "CVE-2025-23061 (mongoose (npm)): Mongoose before 8.9.5 can improperly use a nested $where filter with a populate() match, leading to search injection. NOTE…"
type: vulnerability-record
section: "Security Digest"
date_published: 2025-01-15
date_modified: 2025-01-17
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2025-23061"
kev: false
cvss: 9
epss: 0.07284
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2025-23061: Mongoose search injection vulnerability

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 7.3% , percentile 94: FIRST’s model estimates a 7.3% chance of exploitation activity in the next 30 days, higher than 94% of all scored CVEs (elevated). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes mongoose (npm) >= 8.0.0-rc0, < 8.9.5, fixed in 8.9.5 ; mongoose (npm) >= 7.0.0-rc0, < 7.8.4, fixed in 7.8.4 ; mongoose (npm) < 6.13.6, fixed in 6.13.6 . Check your lockfile, including transitive dependencies.

## What it is

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 packages

- npm `mongoose` >= 8.0.0-rc0, < 8.9.5 → fixed: 8.9.5
- npm `mongoose` >= 7.0.0-rc0, < 7.8.4 → fixed: 7.8.4
- npm `mongoose` < 6.13.6 → fixed: 6.13.6

## Affected products (CVE record)

- mongoosejs Mongoose: 6.0.0 < 6.13.6, 7.0.0 < 7.8.4, 8.0.0 < 8.9.5

## Severity

- mitre CVSS 3.1: 9 `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`
- GitHub CVSS 3.1: 9.0 `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none , automatable no , technical impact total .
- FIRST EPSS (model of 2026-10-21): 7.28% probability of exploitation activity in the next 30 days; percentile 94.

## Sources

- [GitHub Advisory GHSA-vg7j-7cwx-8wgw](https://github.com/advisories/GHSA-vg7j-7cwx-8wgw)
- [CVE.org record CVE-2025-23061](https://www.cve.org/CVERecord?id=CVE-2025-23061)
- [NVD entry CVE-2025-23061](https://nvd.nist.gov/vuln/detail/CVE-2025-23061)
- [npmjs.com](https://www.npmjs.com/package/mongoose?activeTab=versions)
- [github.com](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [github.com](https://github.com/Automattic/mongoose/releases/tag/8.9.5)
- [github.com](https://github.com/Automattic/mongoose/commit/64a9f9706f2428c49e0cfb8e223065acc645f7bc)
- [github.com](https://github.com/Automattic/mongoose/compare/6.13.5...6.13.6)
- [github.com](https://github.com/Automattic/mongoose/compare/7.8.3...7.8.4)
- [github.com](https://github.com/Automattic/mongoose/compare/8.9.4...8.9.5)
- [github.com](https://github.com/Automattic/mongoose/releases/tag/6.13.6)
- [github.com](https://github.com/Automattic/mongoose/releases/tag/7.8.4)
- [github.com](https://github.com/advisories/GHSA-m7xq-9374-9rvx)

---
Source page: https://erroneo.us/security/cve/CVE-2025-23061/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
