---
id: "CVE-2026-113870"
kind: "vulnerability"
aliases: ["CVE-2026-113870"]
title: "MongoDB Compass: crafted view opens and runs code as the user"
severity: "high"
cvss: 8.8
epss: 0.00238
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["desktop", "developers", "mongodb-compass", "package"]
not_affected_if: ["no-compass-use", "views-from-trusted-deployments-only"]
published_at: "2026-10-21T19:17:00+00:00"
first_seen_at: "2026-10-23T21:57:29+00:00"
updated_at: "2026-10-24T13:15:54+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113870", "first_seen_at": "2026-10-23T21:57:29+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-113870", "first_seen_at": "2026-10-24T13:15:54+00:00"}]
---

# MongoDB Compass: crafted view opens and runs code as the user

MongoDB Compass fails to escape certain BSON values when it converts a stored view's aggregation pipeline into editable source. A user who connects to a deployment with a specially crafted view and opens that view for editing can have arbitrary code executed with their own privileges.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

Check the installed Compass version under Help > About, or run the Compass package manager query for mongodb-compass and compare it to the fixed release.

## Fix

Upgrade MongoDB Compass to a fixed release; the sources do not name the exact version.
If you cannot upgrade yet, avoid opening views from untrusted or unknown MongoDB deployments in Compass.

## Timeline

- 2026-10-23T21:57:29+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-113870
- 2026-10-24T13:15:54+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-113870

## From the sources

MongoDB Compass improperly escapes certain BSON values when converting a stored view’s aggregation pipeline into editable source. When a user connects to a MongoDB deployment containing a specially crafted view and opens that view for editing, the values can cause arbitrary code to execute with the privileges of the user running Compass.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
