Improper Input Validation in Automattic Mongoose
Automattic Mongoose through 5.7.4 allows attackers to bypass access control (in some applications) because any query object with a _bsontype attribute is ignored. For example, adding "_bsontype":"a" can sometimes interfere with a query filter. NOTE: this CVE is about Mongoose's failure to work around this _bsontype special case that exists in older versions of the bson parser (aka the mongodb/js-bson project).
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | mongoose | >= 5.0.0, < 5.7.5, < 4.13.21 | 5.7.5, 4.13.21 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2019-17426
- https://github.com/Automattic/mongoose/issues/8222
- https://github.com/Automattic/mongoose/commit/f3eca5b94d822225c04e96cbeed9f095afb3c31c
- https://github.com/Automattic/mongoose/commit/f88eb2524b65a68ff893c90a03c04f0913c1913e
- https://github.com/Automattic/mongoose
- https://github.com/Automattic/mongoose/commits/4.13.21
- https://github.com/Automattic/mongoose/releases/tag/4.13.21
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N- Weakness (CWE)
CWE-20- Platform
- npm
- Package
mongoose- Disclosed
- 22.10.2019
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-8687-vv9j-hgph - CC BY 4.0
Vulnerability history: mongoose
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 9
- First → latest
- 10.2019 07.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 4
- High 3
- Medium 2
Disclosures per year
- 2019: 1
- 2020: 1
- 2021: 0
- 2022: 2
- 2023: 1
- 2024: 1
- 2025: 1
- 2026: 2
-
Improper Input Validation in Automattic Mongoose this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.