CVE-2024-53900
JSON

9.1critical

Mongoose search injection vulnerability

Severity
9.1critical CVSS:3.1 by CISA-ADP
Exploit likelihood
3.40% (higher than 89% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-m7xq-9374-9rvxBIT-MONGOOSE-2024-53900

Description

Mongoose before 8.8.3 can improperly use $where in match, leading to search injection.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
automattic mongoosebefore 8.8.3CVE List
mongoose (npm)from 8.0.0-rc0 before 8.8.3, from 7.0.0-rc0 before 7.8.3, from 6.0.0-rc0 before 6.13.5, from 3.6.0-rc0 before 5.13.23GitHub Advisory Database
mongoosejs mongoosebefore 6.13.5, from 7.0.1 before 7.8.3, from 8.0.1 before 8.8.3, 7.0.0, 8.0.0NVD
mongoose (Bitnami)before 6.13.5, from 7.0.0 before 8.8.3Bitnami Vulnerability Database

All scores

CISA-ADP9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
GitHub9.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Bitnami Vulnerability Databasecritical rating

Classification

CWE-89

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

Mongoose before 8.8.3 can improperly use $where in match, leading to search injection.

GitHub Advisory Database

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.

NVD (es)

Mongoose anterior a 8.8.3 puede usar $where incorrectamente en la coincidencia.

References

https://www.npmjs.com/package/mongoose?activeTab=versionsproduct, web
https://github.com/Automattic/mongoose/releasesarticle, release-notes, web
https://github.com/Automattic/mongoose/blob/master/CHANGELOG.mdarticle, release-notes, web
https://github.com/Automattic/mongoose/commit/c9e86bff7eef477da75a29af62a06d41a835a156fix, patch, web
https://github.com/advisories/GHSA-m7xq-9374-9rvxadvisory, vendor-advisory
https://nvd.nist.gov/vuln/detail/CVE-2024-53900advisory, web
https://github.com/github/advisory-database/pull/6769web
https://github.com/github/advisory-database/pull/6776web
https://github.com/Automattic/mongoose/commit/33679bcf8ca43d74e3e8ecd4cc224826772d805bweb
https://github.com/Automattic/mongoose/commit/bbb6fa7ecb44bbaf5bea955d886378a1247bce0bweb
https://github.com/Automattic/mongoosepackage
https://github.com/Automattic/mongoose/compare/6.13.4...6.13.5web

Sources

SourceRecordLicence
CVE ListCVE-2024-53900 changed 2025-01-06CVE Terms of Use
GitHub Advisory DatabaseGHSA-m7xq-9374-9rvx changed 2026-02-05CC-BY-4.0
NVDCVE-2024-53900 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-MONGOOSE-2024-53900 changed 2026-09-08Apache-2.0