VDB
Sign up
CRITICAL9.8

GHSA-m7xq-9374-9rvx

Mongoose search injection vulnerability

Quick fix

GHSA-m7xq-9374-9rvx — mongoose: upgrade to the fixed version with the command below.

npm install mongoose@8.8.3

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/mongoose
Introduced in: 8.0.0-rc0Fixed in: 8.8.3
Fixnpm install mongoose@8.8.3
npm/mongoose
Introduced in: 7.0.0-rc0Fixed in: 7.8.3
Fixnpm install mongoose@7.8.3
npm/mongoose
Introduced in: 6.0.0-rc0Fixed in: 6.13.5
Fixnpm install mongoose@6.13.5
npm/mongoose
Introduced in: 3.6.0-rc0Fixed in: 5.13.23
Fixnpm install mongoose@5.13.23

References