GitHub Advisoryadvisory · npm

GHSA-m7xq-9374-9rvx Mongoose search injection vulnerability

HIGH Published 2024-12-02 Modified 2026-02-04 Official page ↗
Aliases
CVE-2024-53900
Ecosystem
npm
Packages
mongoose
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-89
Reviewed
2024-12-02

Affected packages

• npm mongoose: >= 8.0.0-rc0, < 8.8.3 → fixed in 8.8.3 • npm mongoose: >= 7.0.0-rc0, < 7.8.3 → fixed in 7.8.3 • npm mongoose: >= 6.0.0-rc0, < 6.13.5 → fixed in 6.13.5 • npm mongoose: >= 3.6.0-rc0, < 5.13.23 → fixed in 5.13.23

Description

Mongoose versions prior to 8.8.3, 7.8.3, 6.13.5, and 5.13.23 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.

Related

Alias · CVE (1)

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

Weakness · CWE (1)

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command weakness

References