Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

Mongoose: Connection-level sanitizeFilter not applied

CVSS 3.1 7.5 HIGHEUVD CVSS 3.1 7.5 CVSS 3.1 · [email protected] · Secondary 7.5 HIGHCVSS_V3 Publisher rating HIGHFixed by mongoose 6.13.12Fixed by mongoose 7.8.13Fixed by mongoose 8.24.7Fixed by mongoose 9.11.4KEV status unknown

cve-program · CVE-2026-125119

Published

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. From 6.0.0 until 6.13.12, 7.8.13, 8.24.7, and 9.11.4, Mongoose stores the connection-level sanitizeFilter option in Connection.config, but Query.prototype._castConditions() and query casting check other option locations and do not read that configuration. An application that enables sanitizeFilter through mongoose.connect() or createConnection() and passes an attacker-controlled object into a query filter therefore receives a connection that reports the defense as enabled while query selector objects remain unsanitized. A crafted password value using a query operator can match an account record without the expected literal password, while global configuration through mongoose.set('sanitizeFilter') and per-query Model.find().sanitizeFilter() remain unaffected. This issue is fixed in versions 6.13.12, 7.8.13, 8.24.7, and 9.11.4.

Read the publisher's advisory

euvd · EUVD-2026-120502

Published

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. From 6.0.0 until 6.13.12, 7.8.13, 8.24.7, and 9.11.4, Mongoose stores the connection-level sanitizeFilter option in Connection.config, but Query.prototype._castConditions() and query casting check other option locations and do not read that configuration. An application that enables sanitizeFilter through mongoose.connect() or createConnection() and passes an attacker-controlled object into a query filter therefore receives a connection that reports the defense as enabled while query selector objects remain unsanitized. A crafted password value using a query operator can match an account record without the expected literal password, while global configuration through mongoose.set('sanitizeFilter') and per-query Model.find().sanitizeFilter() remain unaffected. This issue is fixed in versions 6.13.12, 7.8.13, 8.24.7, and 9.11.4.

Read the publisher's advisory

nvd · CVE-2026-125119

Published

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. From 6.0.0 until 6.13.12, 7.8.13, 8.24.7, and 9.11.4, Mongoose stores the connection-level sanitizeFilter option in Connection.config, but Query.prototype._castConditions() and query casting check other option locations and do not read that configuration. An application that enables sanitizeFilter through mongoose.connect() or createConnection() and passes an attacker-controlled object into a query filter therefore receives a connection that reports the defense as enabled while query selector objects remain unsanitized. A crafted password value using a query operator can match an account record without the expected literal password, while global configuration through mongoose.set('sanitizeFilter') and per-query Model.find().sanitizeFilter() remain unaffected. This issue is fixed in versions 6.13.12, 7.8.13, 8.24.7, and 9.11.4.

Read the publisher's advisory

osv · GHSA-gg4r-jv3p-qx3c

Published

### Summary sanitizeFilter exists to stop query selector injection: it wraps operator objects such as `{ $ne: null }` in filter values in `$eq`, so they are matched literally. Set on a connection with `mongoose.connect()` or `createConnection(uri, { sanitizeFilter: true })`, the connection reports it as enabled but queries never apply it. An application that relies on the connection-level option and passes an attacker-controlled object into a filter therefore remains open to selector injection, and a password value of `{ $ne: null }` returns the account record without the password. ### Details `NativeConnection#createClient()` at `lib/drivers/node-mongodb-native/connection.js:270-272` moves `options.sanitizeFilter` into `Connection.config` and deletes the original option. `Query#_castConditions()` at `lib/query.js:2413-2423` checks `Connection.options`, the global `options`, and the per-query options, but never `Connection.config`. The defense therefore does not run even though `Connection#get('sanitizeFilter')` returns true. This storage was introduced in Mongoose 6.0.0 and the same mismatch is present in 9.11.2. ### Proof of concept ```javascript import mongoose from 'mongoose' const conn = await mongoose.createConnection('<MONGODB_URI>', { sanitizeFilter: true }).asPromise() const User = conn.model('User', new mongoose.Schema({ username: String, password: String, marker: String })) await User.create({ username: 'victim', password: 'correct-password', marker: 'PROTECTED_RECORD' }) const filter = { username: 'victim', password: { $ne: null } } console.log(conn.get('sanitizeFilter')) console.log((await User.findOne(filter).lean()).marker) ``` A control query with a literal wrong password returned no document in the same run, confirming the filter is otherwise enforced. ### Impact Connection-level `sanitizeFilter` option is not respected. Any user that relies on connection-level config and `sanitizeFilter` to defend against query selector injection is affected. Users that set `sanitizeFilter` globally using `mongoose.set('sanitizeFilter')` or on specific queries using `Model.find().sanitizeFilter()` are not affected.

Read the publisher's advisory

Affected versions, risk and source history

cve-program · CVE-2026-125119

Published

mongoose

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "vendor": "Automattic",
                    "product": "mongoose",
                    "versions": [
                        {
                            "version": ">= 6.0.0, < 6.13.12",
                            "status": "affected"
                        },
                        {
                            "version": ">= 7.0.0, < 7.8.13",
                            "status": "affected"
                        },
                        {
                            "version": ">= 8.0.0, < 8.24.7",
                            "status": "affected"
                        },
                        {
                            "version": ">= 9.0.0, < 9.11.4",
                            "status": "affected"
                        }
                    ]
                }

Original source record · Cite this exact observation · Complete original publisher JSON

euvd · EUVD-2026-120502

Published

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: Nov 9, 2026, 10:32:49 PM

dateUpdated: Nov 12, 2026, 6:04:30 PM

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

nvd · CVE-2026-125119

Published

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Awaiting Analysis

Weakness classifications: CWE-943

Original publisher date fields

published: 2026-11-09T23:17:22.397

lastModified: 2026-11-12T19:18:09.510

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GHSA-gg4r-jv3p-qx3c

Published

mongoose

npm

SEMVER · introduced 6.0.0 → fixed 6.13.12

mongoose

npm

SEMVER · introduced 7.0.0 → fixed 7.8.13

mongoose

npm

SEMVER · introduced 8.0.0 → fixed 8.24.7

mongoose

npm

SEMVER · introduced 9.0.0 → fixed 9.11.4

Original source record · Cite this exact observation · Complete original publisher JSON

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 16 Nov 10:50 UTC · 274 of 275 readable · 250 fully read · 20 waiting for GitHub's hourly limit · documentation 469/469 current