GHSA-vg7j-7cwx-8wgw

Suggest an improvement
Source
https://github.com/advisories/GHSA-vg7j-7cwx-8wgw
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/01/GHSA-vg7j-7cwx-8wgw/GHSA-vg7j-7cwx-8wgw.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-vg7j-7cwx-8wgw
Aliases
Published
2025-01-15T06:30:49Z
Modified
2025-01-17T18:02:40Z
Severity
  • 9.0 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H CVSS Calculator
Summary
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.

Database specific
{
    "nvd_published_at": "2025-01-15T05:15:10Z",
    "cwe_ids": [
        "CWE-94"
    ],
    "severity": "CRITICAL",
    "github_reviewed": true,
    "github_reviewed_at": "2025-01-16T14:02:22Z"
}
References

Affected packages

npm / mongoose

Package

Affected ranges

Type
SEMVER
Events
Introduced
8.0.0-rc0
Fixed
8.9.5

npm / mongoose

Package

Affected ranges

Type
SEMVER
Events
Introduced
7.0.0-rc0
Fixed
7.8.4

npm / mongoose

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.13.6