Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2026-125116

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

Overview

Published
9 Nov 2026
Modified
13 Nov 2026
Medium CVE
3 Registry packages
0 OS packages
0 Linux distributions
Yes Fix available

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.

Source: OX vulnerability database

Severity

4.8 · MEDIUM

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
Low

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L

Weakness: CWE-843

Affected packages · 3

Packages affected by CVE-2026-125116
EcosystemPackageVulnerableFixed in
npm mongoose <6.13.12>=7.0.0, <7.8.13>=8.0.0, <8.24.7>=9.0.0, <9.11.4 6.13.127.8.138.24.79.11.4
Seal npm @seal-security/mongoose >=5.3.3-sp1, <5.3.3-sp999>=7.8.6-sp1, <7.8.6-sp999>=7.8.7-sp1, <7.8.7-sp999>=7.8.8-sp1, <7.8.8-sp999>=8.19.1-sp1, <8.19.1-sp999+7 more 5.3.3-sp9997.8.6-sp9997.8.7-sp9997.8.8-sp9998.19.1-sp999
Seal npm mongoose >=5.3.3-sp0, <5.3.3-sp999>=7.8.6-sp0, <7.8.6-sp999>=7.8.7-sp0, <7.8.7-sp999>=7.8.8-sp0, <7.8.8-sp999>=8.19.1-sp0, <8.19.1-sp999+7 more 5.3.3-sp9997.8.6-sp9997.8.7-sp9997.8.8-sp9998.19.1-sp999

Open a package to see all its vulnerabilities.

Operating systems

No Linux distribution reports this ID.

References

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.