GHSA-m7xq-9374-9rvx

Suggest an improvement
Source
https://github.com/advisories/GHSA-m7xq-9374-9rvx
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-m7xq-9374-9rvx/GHSA-m7xq-9374-9rvx.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-m7xq-9374-9rvx
Aliases
Published
2024-12-02T21:31:20Z
Modified
2026-02-05T00:01:59.584013Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
  • 8.7 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
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.

Database specific
{
    "severity": "HIGH",
    "cwe_ids": [
        "CWE-89"
    ],
    "github_reviewed_at": "2024-12-02T22:19:11Z",
    "github_reviewed": true,
    "nvd_published_at": "2024-12-02T20:15:08Z"
}
References

Affected packages

npm / mongoose

Package

Affected ranges

Type
SEMVER
Events
Introduced
8.0.0-rc0
Fixed
8.8.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-m7xq-9374-9rvx/GHSA-m7xq-9374-9rvx.json"

npm / mongoose

Package

Affected ranges

Type
SEMVER
Events
Introduced
7.0.0-rc0
Fixed
7.8.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-m7xq-9374-9rvx/GHSA-m7xq-9374-9rvx.json"

npm / mongoose

Package

Affected ranges

Type
SEMVER
Events
Introduced
6.0.0-rc0
Fixed
6.13.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-m7xq-9374-9rvx/GHSA-m7xq-9374-9rvx.json"

npm / mongoose

Package

Affected ranges

Type
SEMVER
Events
Introduced
3.6.0-rc0
Fixed
5.13.23

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-m7xq-9374-9rvx/GHSA-m7xq-9374-9rvx.json"