ADVISORIES

GitHub Advisory Database

GHSA-vg7j-7cwx-8wgw

Mongoose search injection vulnerability

Details

Mongoose versions prior to 8.9.5, 7.8.4, and 6.13.6 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.

NOTE: this issue exists because of an incomplete fix for CVE-2024-53900.

Affected packages

EcosystemPackageAffected versions
npmmongoose
From 8.0.0-rc0 before 8.9.5 (fixed in 8.9.5)
npmmongoose
From 7.0.0-rc0 before 7.8.4 (fixed in 7.8.4)
npmmongoose
All versions before 6.13.6 (fixed in 6.13.6)

References