# CVE-2026-126835: MongoDB Node.js driver OIDC bearer token disclosure to unallowed hosts

Source: https://junglewise.ai/threats/cve-2026-126835-the-mongodb-node-js-driver-does-not-consistently-enforce-its  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-12. Updated: 2026-11-12  
License: CC BY 4.0 with a link back

CVE-2026-126835 · Severity: medium · CVSS 6.5 · Published 2026-11-12

The MongoDB Node.js driver fails to consistently validate that OIDC authentication tokens are only sent to approved servers. When an application configures which hosts can receive credentials, the driver may leak the bearer token to other hosts, exposing login credentials. This is particularly risky in multi-tenant or proxy environments where untrusted parties could capture tokens.

Technologies: [MongoDB Node.js Driver](https://junglewise.ai/threats/technologies/node-js-driver). Vendors: [MongoDB](https://junglewise.ai/threats/vendors/mongodb).

## Quick answers

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

**How severe is CVE-2026-126835?** Medium severity, with a CVSS score of 6.5, published 12 November 2026.

**Which products and versions are affected?** MongoDB Node.js Driver 6.7.0 to 7.8.1.

**Is there a fix for CVE-2026-126835?** Yes: fixed in v7.9.0. Until then: Applications using OIDC_CALLBACK or OIDC_HUMAN_CALLBACK in affected versions can avoid the bearer token leak by refusing connection strings whose authMechanismProperties include ENVIRONMENT. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-126835 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-126835?** Check whether you run MongoDB Node.js Driver at an affected version. 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.

## How to fix

- Fixed in v7.9.0

Applications using OIDC_CALLBACK or OIDC_HUMAN_CALLBACK in affected versions can avoid the bearer token leak by refusing connection strings whose authMechanismProperties include ENVIRONMENT.

## Technical details

The vulnerability occurs in OIDC authentication handling where the driver's permitted-host restriction is not enforced during bearer token transmission from OIDC_CALLBACK or OIDC_HUMAN_CALLBACK. An attacker controlling connection configuration can cause bearer tokens to be sent to hosts outside the application's allowlist. The fix in v7.9.0 prevents simultaneous specification of ENVIRONMENT and OIDC callback mechanisms, forcing applications to choose explicit callback handling.

## Affected products

- MongoDB Node.js driver 6.7.0 to 7.8.1

## Timeline

- 2026-11-12: disclosed
- 2026-11-12: patched

## References

- [https://github.com/mongodb/node-mongodb-native/releases/tag/v7.9.0](https://github.com/mongodb/node-mongodb-native/releases/tag/v7.9.0)

## Related threats

- [MongoDB Node.js driver DNS SRV validation bypass](https://junglewise.ai/threats/cve-2026-126837-a-validation-flaw-in-the-dns-srv-host-discovery-of-the-mongodb)
- [MongoDB Node.js driver connection pool data leakage](https://junglewise.ai/threats/cve-2026-119179-a-flaw-in-the-connection-management-layer-of-the-mongodb-node-js)
- [MongoDB Driver authentication data exposure in event publishing](https://junglewise.ai/threats/cve-2021-32050-mongodb-driver-authentication-data-exposure-in-event-publishing)
- [MongoDB Node.js driver exception handling denial of service](https://junglewise.ai/threats/mongodb-node-js-driver-exception-handling-denial-of-service-4ceb0cf4)
