# CVE-2026-113870: MongoDB Compass code execution in BSON value escaping

Source: https://junglewise.ai/threats/cve-2026-113870-mongodb-compass-improperly-escapes-certain-bson-values-when  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-21. Updated: 2026-10-21  
License: CC BY 4.0 with a link back

CVE-2026-113870 · Severity: high · CVSS 8.8 · Published 2026-10-21

MongoDB Compass is a graphical tool used by database administrators to manage and query MongoDB databases. When a user opens a specially crafted stored view for editing, improperly escaped BSON values in the aggregation pipeline can trigger arbitrary code execution with the user's privileges. An attacker who can store a malicious view in a MongoDB deployment could compromise any administrator who opens that view.

Technologies: [MongoDB Compass](https://junglewise.ai/threats/technologies/compass). Vendors: [MongoDB](https://junglewise.ai/threats/vendors/mongodb).

## Quick answers

**Is CVE-2026-113870 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-113870 being exploited in the wild.

**How severe is CVE-2026-113870?** High severity, with a CVSS score of 8.8, published 21 October 2026.

**Which products and versions are affected?** MongoDB Compass.

**Is there a fix for CVE-2026-113870?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-113870 attacked?** It is attacked over the network, in a web application.

**Am I affected by CVE-2026-113870?** Check whether you run MongoDB Compass. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability exists in MongoDB Compass's conversion of a stored view's aggregation pipeline into editable source code, where certain BSON values are improperly escaped. This allows injection of malicious code that executes when a user opens the view for editing. The attack requires network access to a MongoDB deployment and for a user to interact with the malicious view, but does not require prior authentication to Compass itself.

## Affected products

- MongoDB Compass

## Timeline

- 2026-10-21: disclosed

## References

- [https://www.mongodb.com/docs/compass/release-notes/](https://www.mongodb.com/docs/compass/release-notes/)

## Related threats

- [MongoDB Compass TLS certificate validation bypass in Electron](https://junglewise.ai/threats/cve-2026-115929-mongodb-compass-relies-on-electron-a-third-party-runtime-that)
- [MongoDB Compass code injection via unescaped database name](https://junglewise.ai/threats/cve-2026-96750-mongodb-compass-can-interpolate-a-database-name-without-escaping)
- [MongoDB Compass OS command injection via connection import](https://junglewise.ai/threats/cve-2026-14881-mongodb-compass-os-command-injection-via-connection-import)
- [MongoDB Compass prototype pollution in CSV import](https://junglewise.ai/threats/cve-2026-9101-mongodb-compass-prototype-pollution-in-csv-import)
- [MongoDB Compass code injection in EJSON shell parser](https://junglewise.ai/threats/cve-2024-6376-mongodb-compass-code-injection-in-ejson-shell-parser)
