Mongoose: Discriminator key values matching inherited properties (e.g. __t: 'constructor') bypass schema casting and can poison collections
- Exploited
- No known exploitation
- Fix
- Fixed in 6.13.12, 7.8.13, 8.24.7, 9.11.4
- Who is exposed
- Not reported
Do first: Upgrade to a fixed version: 6.13.12, 7.8.13, 8.24.7, 9.11.4.
- Last modified
- A 0-100 score for how much a CVE matters across the industry: exploitation, exposure, how widely the software is used, severity and whether a fix exists.What do these mean? →
- 22/100 · provisional
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
Mongoose, a Node.js library for modeling MongoDB data, can be tricked into mishandling documents when an attacker supplies a discriminator key value such as "constructor" that matches an inherited built-in property. The flaw can be reached remotely without logging in and can let an attacker store unvalidated data or make queries that load those documents fail until the bad document is removed.
Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.
Read the original 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.
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure17/25No login or user action needed per the CVSS vector, reachable over the network without a login · Unknown: No advisory context yet
- Reach?/20Unknown. No tracked technology or package matched
- Severity4.8/10CVSS 4.8
- No patch0/5No signal
What would change the score
- Would score about 67 if added to CISA KEV
- Would score about 62 if CISA's SSVC rates exploitation active
- Would score about 27 if advisories confirm default setups are exposed
What to do
Upgrade to a fixed version: 6.13.12, 7.8.13, 8.24.7, 9.11.4.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- Automattic mongoose
fixed in 6.13.12; From 7.0.0 · fixed in 7.8.13; From 8.0.0 · fixed in 8.24.7; From 9.0.0 · fixed in 9.11.4
Evidence 11
- Advisory
- Repository
- Repository
- Repository
- Repository
Show all 11 sourcesShow fewer sources
- Repository
- Repository
- Repository
- Repository
- Repository
- Repository
Corrections
None so far.
Something wrong on this page? Report an error. Every fix is listed here.
Questions about CVE-2026-125116
Is CVE-2026-125116 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data
Which versions are affected by CVE-2026-125116?
mongoose: 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.Source: cve.now feed data
How do I fix CVE-2026-125116?
Upgrade to a fixed version: 6.13.12, 7.8.13, 8.24.7, 9.11.4.Source: cve.now feed data