# CVE-2026-125117 - Mongoose walks into inherited properties when hydrating, setting, and merging, allowing overwrites of built-in functions (denial of service) and shared schema state

DevFeed: [CVE-2026-125117 - Mongoose walks into inherited properties when hydrating, setting, and merging, allowing overwrites of built-in functions (denial of service) and shared schema state](<https://devfeed.tech/articles/cve-2026-125117-mongoose-walks-into-inherited-properties-when-hydrating-setting-and-merging-allowing-overwrites-of-built-in-functions-denial-of-service-and-shared-schema-124280.md>)

Original publisher: [Read original article](<https://cvefeed.io/vuln/detail/CVE-2026-125117>)

Author: CVEFEED.io; github.com

Published: 2026-11-09T23:17:22Z

Content type: news

Language: en

Sources: [Latest High/Critical Vulnerabilitiy Feed](<https://devfeed.tech/sources/latest-high-critical-vulnerabilitiy-feed.md>)

Topics: [Mongoose](<https://devfeed.tech/topics/mongoose.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [cve](<https://devfeed.tech/tags/cve.md>), [cve-2026-125117](<https://devfeed.tech/tags/cve-2026-125117.md>), [database](<https://devfeed.tech/tags/database.md>), [denial-of-service](<https://devfeed.tech/tags/denial-of-service.md>), [fail](<https://devfeed.tech/tags/fail.md>), [init](<https://devfeed.tech/tags/init.md>), [keys](<https://devfeed.tech/tags/keys.md>), [merge](<https://devfeed.tech/tags/merge.md>), [models](<https://devfeed.tech/tags/models.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [mongoose](<https://devfeed.tech/tags/mongoose.md>), [process](<https://devfeed.tech/tags/process.md>), [replacement](<https://devfeed.tech/tags/replacement.md>), [schema](<https://devfeed.tech/tags/schema.md>), [set](<https://devfeed.tech/tags/set.md>), [state](<https://devfeed.tech/tags/state.md>), [tostring](<https://devfeed.tech/tags/tostring.md>), [update](<https://devfeed.tech/tags/update.md>)

## AI overview

Before Mongoose 6.13.12, 7.8.13, 8.24.7, and 9.11.4, inherited-property traversal in document hydration, dotted-path setting, and update merging could let attacker-controlled keys overwrite reachable shared properties. One reported outcome is replacing Object.prototype.toString.call, causing queries on unrelated models to fail until process restart. With a strict:false subdocument, a controlled path passed to doc.set() could also reach $__schema and change validators or schema options used by later documents. Mongoose blocks __proto__, constructor, and prototype; the described issue instead affects properties on reachable shared objects.

## Source excerpt

CVE ID :CVE-2026-125117 Published : Nov. 9, 2026, 11:17 p.m. | 1 hour, 26 minutes ago 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 can descend into inherited properties while loading database documents in init(), setting dotted paths in $__set, and merging update documents in utils.mergeClone. Attacker-controlled keys such as toString or valueOf can therefore cause Mongoose to write into shared built-in functions instead of an own property. A crafted document, Mixed path, non-strict document or subdocument, findOneAndReplace() replacement, chained update, or Query.prototype.merge() source can overwrite Object.prototype.toString.call, causing later queries on unrelated models to fail until the process restarts. Separately, when an attacker controls the dotted path passed to doc.set(path, value) for a subdocument configured with strict: false, descent through $__set can reach $__schema and alter shared validators or schema options for later documents. Mongoose already blocks __proto__, constructor, and prototype, so this issue overwrites properties on reachable shared objects rather than adding new properties directly to Object.prototype. This issue is fixed in versions 6.13.12, 7.8.13, 8.24.7, and 9.11.4. Severity: 8.2 | HIGH Visit the link for more details, such as CVSS details, affected products, timeline, and more...