---
id: "CVE-2026-126835"
page: "https://infrastack.ai/live/CVE-2026-126835"
kind: "vulnerability"
aliases: ["CVE-2026-126835"]
title: "MongoDB Node.js driver may send OIDC bearer tokens to unpermitted hosts"
severity: "medium"
cvss: 6.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["mongodb", "node.js", "oidc", "package"]
not_affected_if: ["fixed-connection-config", "no-oidc-auth"]
published_at: "2026-11-12T17:17:33+00:00"
first_seen_at: "2026-11-12T17:39:38+00:00"
updated_at: "2026-11-12T17:40:01+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126835", "first_seen_at": "2026-11-12T17:39:38+00:00"}]
exploit_sources: []
---

# MongoDB Node.js driver may send OIDC bearer tokens to unpermitted hosts

Link for people: https://infrastack.ai/live/CVE-2026-126835 (this .md is for agents)

The MongoDB Node.js driver does not consistently enforce its permitted-host list during OIDC authentication. An attacker who can influence the connection settings can get the application's bearer token sent to a host outside that list, exposing the credential.

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

## How to check

- Check whether the project depends on the `mongodb` npm package with `npm ls mongodb`.
- Check whether OIDC authentication is configured, by looking for `authMechanism=MONGODB-OIDC` or an `ALLOWED_HOSTS` / `allowedHosts` setting in the connection code.
- Check whether connection strings or OIDC settings can be influenced by untrusted input.

## Timeline

- 2026-11-12T17:39:38+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-126835

## Documents

- [fix] Release notes: github.com https://github.com/mongodb/node-mongodb-native/releases/tag/v7.9.0

## From the sources

The MongoDB Node.js driver does not consistently enforce its permitted-host restriction during OIDC authentication. A bearer token produced by the embedding application's own login callback may therefore be transmitted to a host outside the configured set of permitted hosts, which may result in unintended disclosure of that credential. No database account is required; the party supplying the connection configuration needs only to influence the settings the application passes to the driver.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
