{"id":"GHSA-gg4r-jv3p-qx3c","revision":null,"records":[{"revision":"e46d69d7d01a45c7aec4518fa9da6b77","observedAt":"2026-11-12T20:16:18.682+00:00","statement":{"source":"cve-program","id":"CVE-2026-125119","aliases":[],"title":"Mongoose: Connection-level sanitizeFilter not applied","description":"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.","state":0,"publishedAt":"2026-11-09T22:32:49.132+00:00","modifiedAt":"2026-11-12T18:04:30.712+00:00","affected":[{"ecosystem":"Vendor product","name":"mongoose","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"Automattic\",\n                    \"product\": \"mongoose\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 6.0.0, < 6.13.12\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \">= 7.0.0, < 7.8.13\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \">= 8.0.0, < 8.24.7\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \">= 9.0.0, < 9.11.4\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"severity":"HIGH"}],"references":["https://github.com/Automattic/mongoose/security/advisories/GHSA-gg4r-jv3p-qx3c","https://github.com/Automattic/mongoose/commit/4bb659478be2f30655a7bdd78bc251bdf111cd29","https://github.com/Automattic/mongoose/commit/4f4f9a79f860786a54133bee2c9af967ec691491","https://github.com/Automattic/mongoose/commit/83eda6af1489e9ef60bb8eee8cf9ee005771b9d5","https://github.com/Automattic/mongoose/commit/b8970c25998c23fbccd17f76c0398b902ff4911d","https://github.com/Automattic/mongoose/releases/tag/6.13.12","https://github.com/Automattic/mongoose/releases/tag/7.8.13","https://github.com/Automattic/mongoose/releases/tag/8.24.7","https://github.com/Automattic/mongoose/releases/tag/9.11.4"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-125119","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-125119","identifiers":["CVE-2026-125119"]},"retained":false,"historicalAffected":[]},{"revision":"22d29534ec4f4e139e975b765e0d2d27","observedAt":"2026-11-14T21:28:06.047+00:00","statement":{"source":"euvd","id":"EUVD-2026-120502","aliases":["CVE-2026-125119","GHSA-gg4r-jv3p-qx3c"],"title":"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.pro…","description":"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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"severity":null}],"references":["https://github.com/Automattic/mongoose/security/advisories/GHSA-gg4r-jv3p-qx3c","https://github.com/Automattic/mongoose/commit/4bb659478be2f30655a7bdd78bc251bdf111cd29","https://github.com/Automattic/mongoose/commit/4f4f9a79f860786a54133bee2c9af967ec691491","https://github.com/Automattic/mongoose/commit/83eda6af1489e9ef60bb8eee8cf9ee005771b9d5","https://github.com/Automattic/mongoose/commit/b8970c25998c23fbccd17f76c0398b902ff4911d","https://github.com/Automattic/mongoose/releases/tag/6.13.12","https://github.com/Automattic/mongoose/releases/tag/7.8.13","https://github.com/Automattic/mongoose/releases/tag/8.24.7","https://github.com/Automattic/mongoose/releases/tag/9.11.4"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-120502","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Nov 9, 2026, 10:32:49 PM","dateUpdated":"Nov 12, 2026, 6:04:30 PM"},"relatedAdvisories":[],"note":"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."},"key":"euvd:EUVD-2026-120502","identifiers":["EUVD-2026-120502","CVE-2026-125119","GHSA-gg4r-jv3p-qx3c"]},"retained":false,"historicalAffected":[]},{"revision":"187e8030cdd842f196e2e69a258dbc37","observedAt":"2026-11-12T21:16:36.492+00:00","statement":{"source":"nvd","id":"CVE-2026-125119","aliases":[],"title":"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.pro…","description":"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.","state":0,"publishedAt":"2026-11-09T23:17:22.397+00:00","modifiedAt":"2026-11-12T19:18:09.51+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"severity":"HIGH"}],"references":["https://github.com/Automattic/mongoose/commit/4bb659478be2f30655a7bdd78bc251bdf111cd29","https://github.com/Automattic/mongoose/commit/4f4f9a79f860786a54133bee2c9af967ec691491","https://github.com/Automattic/mongoose/commit/83eda6af1489e9ef60bb8eee8cf9ee005771b9d5","https://github.com/Automattic/mongoose/commit/b8970c25998c23fbccd17f76c0398b902ff4911d","https://github.com/Automattic/mongoose/releases/tag/6.13.12","https://github.com/Automattic/mongoose/releases/tag/7.8.13","https://github.com/Automattic/mongoose/releases/tag/8.24.7","https://github.com/Automattic/mongoose/releases/tag/9.11.4","https://github.com/Automattic/mongoose/security/advisories/GHSA-gg4r-jv3p-qx3c"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-125119","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Awaiting Analysis","weaknesses":["CWE-943"],"productCriteria":[],"sourceDates":{"published":"2026-11-09T23:17:22.397","lastModified":"2026-11-12T19:18:09.510"},"relatedAdvisories":[],"note":"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."},"key":"nvd:CVE-2026-125119","identifiers":["CVE-2026-125119"]},"retained":false,"historicalAffected":[]},{"revision":"aa5ceda68fc247eb8f8978319da0eb8f","observedAt":"2026-11-10T20:21:38.779+00:00","statement":{"source":"osv","id":"GHSA-gg4r-jv3p-qx3c","aliases":["CVE-2026-125119"],"title":"Mongoose: Connection-level sanitizeFilter not applied","description":"### Summary\n\nsanitizeFilter 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.\n\n### Details\n\n`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.\n\n### Proof of concept\n\n```javascript\nimport mongoose from 'mongoose'\n\nconst conn = await mongoose.createConnection('<MONGODB_URI>', { sanitizeFilter: true }).asPromise()\nconst User = conn.model('User', new mongoose.Schema({\n  username: String,\n  password: String,\n  marker: String\n}))\n\nawait User.create({\n  username: 'victim',\n  password: 'correct-password',\n  marker: 'PROTECTED_RECORD'\n})\n\nconst filter = { username: 'victim', password: { $ne: null } }\nconsole.log(conn.get('sanitizeFilter'))\nconsole.log((await User.findOne(filter).lean()).marker)\n```\n\nA control query with a literal wrong password returned no document in the same run, confirming the filter is otherwise enforced.\n\n### Impact\n\nConnection-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.","state":0,"publishedAt":"2026-11-10T19:56:12+00:00","modifiedAt":"2026-11-10T20:00:05.0347511+00:00","affected":[{"ecosystem":"npm","name":"mongoose","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"6.0.0"},{"kind":"fixed","version":"6.13.12"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"mongoose","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"7.0.0"},{"kind":"fixed","version":"7.8.13"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"mongoose","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"8.0.0"},{"kind":"fixed","version":"8.24.7"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"mongoose","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"9.0.0"},{"kind":"fixed","version":"9.11.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/Automattic/mongoose/security/advisories/GHSA-gg4r-jv3p-qx3c","https://nvd.nist.gov/vuln/detail/CVE-2026-125119","https://github.com/Automattic/mongoose/commit/4bb659478be2f30655a7bdd78bc251bdf111cd29","https://github.com/Automattic/mongoose/commit/4f4f9a79f860786a54133bee2c9af967ec691491","https://github.com/Automattic/mongoose/commit/83eda6af1489e9ef60bb8eee8cf9ee005771b9d5","https://github.com/Automattic/mongoose/commit/b8970c25998c23fbccd17f76c0398b902ff4911d","https://github.com/Automattic/mongoose","https://github.com/Automattic/mongoose/releases/tag/6.13.12","https://github.com/Automattic/mongoose/releases/tag/7.8.13","https://github.com/Automattic/mongoose/releases/tag/8.24.7","https://github.com/Automattic/mongoose/releases/tag/9.11.4"],"sourceUrl":"https://github.com/advisories/GHSA-gg4r-jv3p-qx3c","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-gg4r-jv3p-qx3c","identifiers":["GHSA-gg4r-jv3p-qx3c","CVE-2026-125119"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-16T11:44:54.7554632+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-16T11:44:54.7554632+00:00","lastSuccessAt":"2026-11-16T11:44:55.1148132+00:00","error":null,"lastVerifiedAt":"2026-11-16T11:44:55.1148147+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-6be044d0e08779dadd136f949a536de4047af96f5d7bceb7e190ecffbb8f18ca-b031c4c30f2ebe9268e5c5d33f4ea89da65ca3c9f9859f880ef288344bde788d","complete":true,"records":425916,"lastAttemptAt":"2026-11-16T11:44:52.8756103+00:00","lastSuccessAt":"2026-11-16T11:44:52.8348352+00:00","error":null,"lastVerifiedAt":"2026-11-16T11:44:52.8756103+00:00","snapshotPublishedAt":"2026-11-16T11:24:27+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-65ed5f72e9cf4d7d944fddd792d50665","complete":false,"records":13821,"lastAttemptAt":"2026-11-16T11:45:45.2492397+00:00","lastSuccessAt":"2026-11-16T10:31:57.938+00:00","error":"10 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T10:31:57.938+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13864,"expectedIdentifiers":13874,"failedIdentifiers":10},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-16T11:44:54.7554632+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-16T11:44:54.7554632+00:00","lastSuccessAt":"2026-11-16T11:44:55.1387791+00:00","error":null,"lastVerifiedAt":"2026-11-16T11:44:55.1387803+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-f5f7edac8e2f41ed81f50e079874026a","complete":false,"records":13833,"lastAttemptAt":"2026-11-16T11:45:44.5423454+00:00","lastSuccessAt":"2026-11-16T11:45:44.539+00:00","error":"400 identifier lookups failed; latest failures include HttpError (HTTP 503). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T11:45:44.539+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13474,"expectedIdentifiers":13874,"failedIdentifiers":400},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-64eea06dbd27de8464d5dbce1b78cc794cc59e2d901516ae0d3ea76e624cdae0","complete":true,"records":9955,"lastAttemptAt":"2026-11-16T11:44:54.4664396+00:00","lastSuccessAt":"2026-11-14T13:57:23.1208135+00:00","error":null,"lastVerifiedAt":"2026-11-16T11:44:54.4664396+00:00","snapshotPublishedAt":"2026-11-14T13:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-16T11:44:54.2102075+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-16T11:44:54.2102075+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-16T11:44:54.5871554+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-16T11:44:54.5871554+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-263d9c8d63997345727b11314d9b9377eba9fd4146f04497c069a15e332b60cb","complete":true,"records":232482,"lastAttemptAt":"2026-11-16T11:44:54.3524798+00:00","lastSuccessAt":"2026-11-16T07:32:30.5701252+00:00","error":null,"lastVerifiedAt":"2026-11-16T11:44:54.3524798+00:00","snapshotPublishedAt":"2026-11-16T06:48:00+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}