cbcvebase.
CVE-2025-23061
published 2025-01-15

CVE-2025-23061: 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…

PriorityP264critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EXPLOIT
EPSS
7.03%
93.4th percentile
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

6 ranges
VendorProductVersion rangeFixed in
cesantamongoose>= 0 < 6.13.66.13.6
cesantamongoose>= 7.0.0-rc0 < 7.8.47.8.4
cesantamongoose>= 8.0.0-rc0 < 8.9.58.9.5
mongoosejsmongoose< 6.13.66.13.6
mongoosejsmongoose>= 7.0.0 < 7.8.47.8.4
mongoosejsmongoose>= 8.0.0 < 8.9.58.9.5

Detection & IOCsextracted from sources · hover to see the quote

url/posts?authorMatch={"$and":[{"$where":"this.isAdmin"}]}
  • Look for HTTP requests containing nested $where operators inside logical operators (e.g., $and) targeting the populate() match option — a bypass of the CVE-2024-53900 patch.
  • Match HTTP response body for JSON fields 'isAdmin':true, 'title':, and 'username': together with HTTP 200 and Content-Type application/json to confirm successful NoSQL injection via populate() match.
  • Use Shodan query 'title:"Mongoose"' or FOFA query 'title="Mongoose"' to identify potentially exposed Mongoose-backed Node.js endpoints for targeted scanning.
  • ·The vulnerability only affects Mongoose versions prior to 8.9.5; the nested $where bypass does not apply to patched versions.
  • ·Direct $where injection is already blocked by the prior CVE-2024-53900 fix; only the nested form (e.g., inside $and) constitutes the bypass covered by this CVE.
  • ·Exploitation requires high attack complexity (AC:H per CVSS) and is scoped as Changed (S:C), meaning impact can extend beyond the vulnerable component to the MongoDB server itself.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
ghsa9.1CRITICAL
osv9.1CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.