{"schemaVersion":4,"id":"CVE-2026-125116","aliases":["GHSA-wr5m-5jph-8m96","BIT-mongoose-2026-125116"],"status":"published","duplicateOf":null,"title":"Mongoose: Discriminator key values matching inherited properties (e.g. __t: 'constructor') bypass schema casting and can poison collections","description":"Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Prior to 6.13.12, 7.8.13, 8.24.7, and 9.11.4, Mongoose uses attacker-controlled discriminator key values, including the default __t field, to index plain-object registries such as Model.discriminators and schema.discriminators without requiring an own property. Values such as constructor, toString, or hasOwnProperty can therefore resolve to inherited built-in functions instead of a registered discriminator, causing type confusion in model construction, document creation, hydration, query and update casting, embedded discriminators, and populate operations. In the bulkWrite() insertOne path with skipValidation enabled, a constructor value can cause a raw input object to be stored without schema casting or strict filtering, and a stored poisoned document can make every query that hydrates it fail until the document is removed. The weakness reads inherited properties but does not modify Object.prototype and is not prototype pollution. This issue is fixed in versions 6.13.12, 7.8.13, 8.24.7, and 9.11.4.","dates":{"published":"2026-11-09T22:20:28.483Z","modified":"2026-11-13T13:37:18.947Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":4.8,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":4.8,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":4.8,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":4.8,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L","exploitability":5.6,"impact":4.2,"computed":true}]},"epss":{"probability":0.00519,"percentile":0.45609,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":null,"baselineDate":null,"baselineScore":null},"history":[{"date":"2026-11-10T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00512,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00512,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00512,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00512,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00512,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00512,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00519,"percentile":0.45609}],"last30":[{"date":"2026-11-10T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00339,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00512,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00512,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00512,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00512,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00512,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00512,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00519,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00519,"percentile":0.45609}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-843","name":"Access of Resource Using Incompatible Type","description":"The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.","type":"weakness","status":"Incomplete","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/843.html"}],"affected":[{"vendor":"automattic","product":"mongoose","name":"mongoose","label":"mongoose","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 6.13.12","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"6.13.12","endInclusive":false}},{"text":"≥ 7.0.0, < 7.8.13","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"7.0.0","startInclusive":true,"end":"7.8.13","endInclusive":false}},{"text":"≥ 8.0.0, < 8.24.7","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"8.0.0","startInclusive":true,"end":"8.24.7","endInclusive":false}},{"text":"≥ 9.0.0, < 9.11.4","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"9.0.0","startInclusive":true,"end":"9.11.4","endInclusive":false}}],"versionsText":"< 6.13.12 | ≥ 7.0.0, < 7.8.13 | ≥ 8.0.0, < 8.24.7 | ≥ 9.0.0, < 9.11.4","eol":null,"hubHref":"/vendor/automattic/mongoose"},{"vendor":"Npm","product":"mongoose","name":"mongoose","label":"mongoose","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/mongoose","purlType":"npm","versions":[{"text":"< 6.13.12","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"6.13.12","endInclusive":false}},{"text":"≥ 7.0.0, < 7.8.13","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"7.0.0","startInclusive":true,"end":"7.8.13","endInclusive":false}},{"text":"≥ 8.0.0, < 8.24.7","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"8.0.0","startInclusive":true,"end":"8.24.7","endInclusive":false}},{"text":"≥ 9.0.0, < 9.11.4","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"9.0.0","startInclusive":true,"end":"9.11.4","endInclusive":false}}],"versionsText":"< 6.13.12 | ≥ 7.0.0, < 7.8.13 | ≥ 8.0.0, < 8.24.7 | ≥ 9.0.0, < 9.11.4","eol":null,"hubHref":null}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/Automattic/mongoose/security/advisories/GHSA-wr5m-5jph-8m96","label":"github.com/Automattic/mongoose/security/advisories/GHSA-wr5m-5jph-8m96","hostname":"github.com","tags":["X Refsource CONFIRM","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/0ecd8040d9b446f36535d79938c130c800f91766","label":"github.com/Automattic/mongoose/commit/0ecd8040d9b446f36535d79938c130c800f91766","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/18afab75bea861f625b7c5b54635c84567ec566c","label":"github.com/Automattic/mongoose/commit/18afab75bea861f625b7c5b54635c84567ec566c","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/390453c8ce1b36b6cfd1e63432a910da1f3d81d5","label":"github.com/Automattic/mongoose/commit/390453c8ce1b36b6cfd1e63432a910da1f3d81d5","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/8cee51beead554df1f3d05645edb439c69eb2a9b","label":"github.com/Automattic/mongoose/commit/8cee51beead554df1f3d05645edb439c69eb2a9b","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/b26c43554233134ea978c5852babe13be858b2cf","label":"github.com/Automattic/mongoose/commit/b26c43554233134ea978c5852babe13be858b2cf","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/b68f90734b50cd22c89a669c8ca1469d7234b296","label":"github.com/Automattic/mongoose/commit/b68f90734b50cd22c89a669c8ca1469d7234b296","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/6.13.12","label":"github.com/Automattic/mongoose/releases/tag/6.13.12","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/7.8.13","label":"github.com/Automattic/mongoose/releases/tag/7.8.13","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/8.24.7","label":"github.com/Automattic/mongoose/releases/tag/8.24.7","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/9.11.4","label":"github.com/Automattic/mongoose/releases/tag/9.11.4","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-125116","label":"nvd.nist.gov/vuln/detail/CVE-2026-125116","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/Automattic/mongoose","label":"github.com/Automattic/mongoose","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-11-09T22:20:28.483Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-11-13T13:37:18.947Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"routine","tag":null,"reason":"Not severe (CVSS 4.8, network access); no exploitation reported by the 5 checked sources","nextStep":"Fix in the normal cadence","rank":[0,0,0,0,1,48],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.00519,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2026-11-13T13:37:18.947Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":4.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L","version":"3.1","headline":true},{"type":"cvss","source":"nvd","date":"2026-11-13T13:37:18.947Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":4.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L","version":"3.1"},{"type":"cvss","source":"osv_npm","date":"2026-11-13T13:37:18.947Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":4.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L","version":"3.1"},{"type":"adp","source":"cisa-adp","date":"2026-11-13T13:36:48.655Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"exploitation":"poc"}],"epss":{"value":0.00519,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T10:02:10.250Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T10:02:10.837Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T10:02:11.033Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T10:01:03.214Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T10:02:08.667Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T10:02:07.694Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T10:11:02.565Z","stale":false,"partial":false}}