Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. mongoose
  4. ›
  5. CVE-2024-53900

CVE-2024-53900: Mongoose search injection vulnerability

December 2, 2024 (updated February 4, 2026)

Mongoose versions prior to 8.8.3, 7.8.3, and 6.13.5 are vulnerable to improper use of the $where operator. This vulnerability arises from the ability of the $where clause to execute arbitrary JavaScript code in MongoDB queries, potentially leading to code injection attacks and unauthorized access or manipulation of database data.

References

  • github.com/Automattic/mongoose
  • github.com/Automattic/mongoose/blob/master/CHANGELOG.md
  • github.com/Automattic/mongoose/commit/33679bcf8ca43d74e3e8ecd4cc224826772d805b
  • github.com/Automattic/mongoose/commit/c9e86bff7eef477da75a29af62a06d41a835a156
  • github.com/Automattic/mongoose/compare/6.13.4...6.13.5
  • github.com/Automattic/mongoose/compare/7.8.2...7.8.3
  • github.com/Automattic/mongoose/compare/8.8.2...8.8.3
  • github.com/Automattic/mongoose/releases
  • github.com/advisories/GHSA-m7xq-9374-9rvx
  • github.com/github/advisory-database/pull/6769
  • nvd.nist.gov/vuln/detail/CVE-2024-53900
  • www.npmjs.com/package/mongoose?activeTab=versions

Code Behaviors & Features

Detect and mitigate CVE-2024-53900 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 3.6.0-rc0 before 6.13.5, all versions starting from 7.0.0-rc0 before 7.8.3, all versions starting from 8.0.0-rc0 before 8.8.3

Fixed versions

  • 8.8.3
  • 7.8.3
  • 6.13.5

Solution

Upgrade to versions 6.13.5, 7.8.3, 8.8.3 or above.

Impact 9.1 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

npm/mongoose/CVE-2024-53900.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:27 +0000.