ADVISORIES

GitHub Advisory Database

GHSA-m7xq-9374-9rvx

Mongoose search injection vulnerability

Details

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.

Affected packages

EcosystemPackageAffected versions
npmmongoose
From 8.0.0-rc0 before 8.8.3 (fixed in 8.8.3)
npmmongoose
From 7.0.0-rc0 before 7.8.3 (fixed in 7.8.3)
npmmongoose
From 6.0.0-rc0 before 6.13.5 (fixed in 6.13.5)
npmmongoose
From 3.6.0-rc0 before 5.13.23 (fixed in 5.13.23)

References