# CVE-2026-125116: Mongoose: Discriminator key values matching inherited properties (e.g. __t: 'constructor') bypass schema casting and can poison collections

- Severity: Medium 4.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.52%, higher than 45% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-11-09T22:20:28.483Z
- Modified: 2026-11-27T06:55:51.095Z
- Also known as: GHSA-wr5m-5jph-8m96, BIT-MONGOOSE-2026-125116
- Weaknesses: CWE-843
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- Automattic mongoose: < 6.13.12; >= 7.0.0, < 7.8.13; >= 8.0.0, < 8.24.7; >= 9.0.0, < 9.11.4
- mongoose (npm): before 6.13.12; from 7.0.0 before 7.8.13; from 8.0.0 before 8.24.7; from 9.0.0 before 9.11.4
- mongoose (Bitnami): before 6.13.12; from 7.0.0 before 7.8.13; from 8.0.0 before 8.24.7; from 9.0.0 before 9.11.4

## Every score

- GitHub_M: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L`
- GitHub: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/Automattic/mongoose/security/advisories/GHSA-wr5m-5jph-8m96> (exploit, web)
- <https://github.com/Automattic/mongoose/commit/0ecd8040d9b446f36535d79938c130c800f91766> (web)
- <https://github.com/Automattic/mongoose/commit/18afab75bea861f625b7c5b54635c84567ec566c> (web)
- <https://github.com/Automattic/mongoose/commit/390453c8ce1b36b6cfd1e63432a910da1f3d81d5> (web)
- <https://github.com/Automattic/mongoose/commit/8cee51beead554df1f3d05645edb439c69eb2a9b> (web)
- <https://github.com/Automattic/mongoose/commit/b26c43554233134ea978c5852babe13be858b2cf> (web)
- <https://github.com/Automattic/mongoose/commit/b68f90734b50cd22c89a669c8ca1469d7234b296> (web)
- <https://github.com/Automattic/mongoose/releases/tag/6.13.12> (web)
- <https://github.com/Automattic/mongoose/releases/tag/7.8.13> (web)
- <https://github.com/Automattic/mongoose/releases/tag/8.24.7> (web)
- <https://github.com/Automattic/mongoose/releases/tag/9.11.4> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-125116> (advisory, web)
- <https://github.com/Automattic/mongoose> (package)

## Sources

- CVE List: [CVE-2026-125116](https://www.cve.org/CVERecord?id=CVE-2026-125116), CVE Terms of Use, modified 2026-11-13
- GitHub Advisory Database: [GHSA-wr5m-5jph-8m96](https://github.com/advisories/GHSA-wr5m-5jph-8m96), CC-BY-4.0, modified 2026-11-10
- NVD: [CVE-2026-125116](https://nvd.nist.gov/vuln/detail/CVE-2026-125116), Public domain, modified 2026-11-13
- Bitnami Vulnerability Database: [BIT-MONGOOSE-2026-125116](https://osv.dev/vulnerability/BIT-MONGOOSE-2026-125116), Apache-2.0, modified 2026-11-27

---

Page: https://cve.day/CVE-2026-125116 · Whole record: https://cve.day/CVE-2026-125116.json · Rebuilt by cve.day 2026-11-27T07:07:24.572Z
