---
id: CVE-2026-18708
title: >-
  An issue in MongoDB Server's JavaScript scripting engine could allow an
  authenticated user with write privileges to cause code they control to be
  executed within the query scope of other users, through a specially crafted
  stored value pr…
summary: >-
  An issue in MongoDB Server's JavaScript scripting engine could allow an
  authenticated user with write privileges to cause code they control to be
  executed within the query scope of other users, through a specially crafted
  stored value pr…
severity: medium
cvss: 6.4
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:L'
cwe:
  - CWE-94
vendor: mongodb
product: mongodb
affected:
  - 'mongodb >= 7.0.0, < 7.0.40'
  - 'mongodb >= 8.0.0, < 8.0.29'
  - 'mongodb >= 8.2.0, <= 8.2.12'
  - 'mongodb >= 8.3.0, < 8.3.8'
  - mongodb = 9.0.0
  - mongodb = 9.1.0
patched:
  - mongodb 8.3.8
published: '2026-08-11'
updated: '2026-09-16'
sourceUpdated: '2026-09-16T15:19:39.170'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-18708'
references:
  - url: 'https://jira.mongodb.org/browse/SERVER-130167'
    label: cna@mongodb.com
tags:
  - nvd
epss: 0.0038
epssPercentile: 0.29135
ingestedAt: '2026-08-29T19:41:16.199Z'
---

## Overview

An issue in MongoDB Server's JavaScript scripting engine could allow an authenticated user with write privileges to cause code they control to be executed within the query scope of other users, through a specially crafted stored value processed during an internal maintenance cycle. This could result in corruption of query results affecting other users and denial of service targeted at their operations on the same database. Impact is limited to the scripting engine's execution sandbox, which does not provide access to database, filesystem, or network resources.

## Affected

- `mongodb >= 7.0.0, < 7.0.40`
- `mongodb >= 8.0.0, < 8.0.29`
- `mongodb >= 8.2.0, <= 8.2.12`
- `mongodb >= 8.3.0, < 8.3.8`
- `mongodb = 9.0.0`
- `mongodb = 9.1.0`

## Remediation

Upgrade past the affected range:

- `mongodb 8.3.8`
