Skip to main content

Mongoose EUVDEUVD-2026-120498

| CVE-2026-125117 HIGH
Improperly Controlled Modification of Object Prototype Attributes (Prototype Pollution) (CWE-1321)
2026-11-09 GitHub_M GHSA-8332-j7wj-wjw4
8.2
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted JSON body to endpoint
  2. Exploit
    Mongoose descends into inherited key (toString/valueOf)
  3. Execution
    Overwrite Object.prototype.toString.call
  4. Impact
    Later queries throw TypeError, process denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V3 - Web Frontend Security Prototype pollution prevention
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the application to pass attacker-controlled keys into one of the three vulnerable paths: (1) building/setting a document where a Mixed path exists on an otherwise strict schema (e.g. new Model(req.body) or doc.set() with a dotted key like 'mixed.toString.call'), or any root path on a schema configured with strict:false; (2) findOneAndReplace() with an untrusted replacement, update calls chained onto an existing query, or Query.prototype.merge() with an untrusted source; or (3) merely reading a stored document that already contains a field such as {"toString":{"call":1}}, in which case any later find()/findOne()/cursor/hydrate() read triggers the overwrite with no live write path needed. The shared-schema-tampering variant additionally requires a subdocument configured with strict:false and an application that passes a user-controlled path to doc.set(path, value). Limiting factors: lean() queries are not affected; a schema with no Mixed path, no strict:false, and no untrusted replacement/merge/user-controlled set-path is not reachable through these vectors; and __proto__, constructor and prototype remain blocked, so the impact is overwriting reachable shared built-ins and Mongoose internals rather than adding new Object.prototype members.

Impact

The input CVSS of 8.2 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H) is driven by availability (A:H) with a low integrity component (I:L) and no confidentiality impact (C:N) - this is a denial-of-service and shared-state-tampering flaw, not data theft, so the 'Information Disclosure' tag is inconsistent with the vector and with the advisory. The vuln.today priority is 'this_week' rather than act_now/emergency, which aligns with the signal picture: there is no CISA KEV listing and no EPSS value supplied, so there is no evidence of active exploitation or of high predicted exploitation probability. However, the GHSA advisory (GHSA-8332-j7wj-wjw4) contains multiple working proof-of-concept snippets and the fixing commits are public, so a would-be attacker has a complete recipe. The net picture is a genuinely reachable, easy-to-trigger DoS in a very widely used library that is realistic to weaponize but, as of this analysis, not confirmed as being exploited in the wild - a real patch-this-week priority rather than a drop-everything emergency. Missing data to note explicitly: no EPSS score and no KEV status were provided, and the input did not carry an explicit 'POC: confirmed' flag even though the advisory itself publishes exploit code.

Exploit ScenarioDerived

A Node.js application builds documents from request bodies (e.g. new Model(req.body) on a schema containing a Mixed path, or findOneAndReplace() with an untrusted replacement). An unauthenticated attacker submits a JSON body such as {"meta.toString.call": 1} or {"toString":{"call":1}}, causing Mongoose to descend into the inherited Object.prototype.toString and overwrite its .call property; every subsequent query in the process then throws TypeError until the process is restarted. Working PoC snippets for all three code paths are published in the GHSA advisory, so no exploit development is required.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 09, 2026

Prototype pollution in Mongoose (all versions prior to 6.13.12, 7.8.13, 8.24.7, and 9.11.4) lets attacker-controlled keys such as toString or valueOf be written onto shared built-in functions and Mongoose internals, after which every later query in the process throws 'TypeError: _toString.call is not a function' until the process restarts. Three sinks are reachable: document hydration in init()/Model.hydrate(), dotted-path assignment through $__set, and update merging in utils.mergeClone (used by findOneAndReplace(), chained updates, and Query.prototype.merge()); a separate variant reachable through a strict:false subdocument plus an application-controlled doc.set(path, value) can strip shared validators such as required or alter schema options for all later documents in the process. The vendor advisory at GHSA-8332-j7wj-wjw4 includes proof-of-concept snippets demonstrating the overwrite; there is no CISA KEV listing and no confirmed active exploitation, and the assessed impact is availability (A:H) with low integrity impact and no confidentiality impact.

RemediationAI

Vendor-released patch: upgrade to 6.13.12, 7.8.13, 8.24.7, or 9.11.4 (npm ranges ^6.13.12, ^7.8.13, ^8.24.7, ^9.11.4); the fixes are the Object.hasOwn guards in the commits https://github.com/Automattic/mongoose/commit/18b5513dd463731a2caf0d3395ef1d9eb0735f50, https://github.com/Automattic/mongoose/commit/2a195d19a4dd240f039a0a226614d5804e8187ee, https://github.com/Automattic/mongoose/commit/3cb702b8d079c3e267f0b10f41673a1590f703c8, https://github.com/Automattic/mongoose/commit/85cf897105edfeb5f56be42a18a68704434cac82, https://github.com/Automattic/mongoose/commit/8cee51beead554df1f3d05645edb439c69eb2a9b, and https://github.com/Automattic/mongoose/commit/8eb74cb4a550cbe0225963b07aebacbd999d4b74, with details in the advisory https://github.com/Automattic/mongoose/security/advisories/GHSA-8332-j7wj-wjw4. Because a successful overwrite persists for the life of the process, restarting the Node.js workers is required to clear an already-polluted state even after the upgrade. If upgrading cannot be done this week, the advisory's own limiting conditions indicate the exposure surface to close: avoid passing untrusted objects into new Model(...) or doc.set() on schemas that contain a Mixed path or are configured with strict:false, since those are the routes into $__set and init(); do not pass untrusted replacements to findOneAndReplace(), do not chain updates carrying untrusted data onto an existing query, and do not merge untrusted source queries, since those reach utils.mergeClone; and do not forward user-controlled strings to doc.set(path, value) for strict:false subdocuments, which is the only route to the shared-schema tampering variant. lean() queries do not hydrate documents and are not affected by the init() path, so read-only endpoints can be moved to lean() as a partial reduction of exposure, at the cost of losing Mongoose document behavior on those results.

Affected VersionsENISA

Mongoose 7.0.0, < 7.8.13
Mongoose < 6.13.12
Mongoose 9.0.0, < 9.11.4
Mongoose 8.0.0, < 8.24.7

Affected Packages

npm mongoose fix: 6.13.12, 7.8.13, 8.24.7, 9.11.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

CWE-1321 (improperly controlled modification of object prototype attributes) applies here in a constrained form: Mongoose already blocks __proto__, constructor, and prototype, so the flaw does not add members to Object.prototype directly. Instead, three copy loops read a target by key without an own-property check, so a key naming an inherited property causes the write to land on the shared object behind that property. The CPE cpe:2.3:a:automattic:mongoose identifies the npm 'mongoose' MongoDB object-modeling library as the affected component. In init() (reached by find(), findOne(), cursors, populated documents, and Model.hydrate()), a stored field named toString makes doc[i] resolve to Object.prototype.toString, which is truthy, so hydration recurses onto that function and copies attacker-controlled subfields onto it. In Document.prototype.$__set, walking a dotted path reads obj[parts[i]] and descends into whatever it finds, including inherited functions on plain objects and prototype getters on subdocuments such as $__schema, schema, $__middleware, and $__schemaTypeOptions, which point at objects shared by every document of the model. In utils.mergeClone, the line to[key] = clone(fromObj[key]) / mergeClone(to[key], val) recurses into inherited built-ins when key is toString and the target has no own property of that name. The upstream fix adds Object.hasOwn guards in lib/document.js (init and $__set) and lib/utils.js (mergeClone), skipping keys that are inherited rather than own; accompanying tests confirm the fields are ignored and the built-ins remain intact. lean() queries bypass the hydration path and are not affected.

Know when Mongoose gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.2 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
vuln.today AI 8.2 HIGH

Attacker-supplied request data reaches the sink remotely with no auth and a single crafted key (AV:N/AC:L/PR:N/UI:N); overwriting shared built-ins yields process-wide DoS (A:H) and limited integrity impact on shared schema state (I:L), no confidentiality (C:N).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
High

Lifecycle Timeline

2
Patch available
Nov 09, 2026 - 23:18 EUVD
CVE Published
Nov 09, 2026 - 22:26 cve.org
HIGH 8.2

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2 npm packages depend on mongoose (2 direct, 0 indirect)

Ecosystem-wide dependent count for version 7.0.0.

Technical POC Analysis

CWE-1321 (improperly controlled modification of object prototype attributes).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity vulnerability in the Mongoose library (used in Node.js applications) allows attackers to corrupt shared functions, causing database queries to fail and potentially exposing sensitive data. This affects any application using affected Mongoose versions, leading to service outages and data integrity risks that require immediate leadership attention.

Business Impact: High
Compensating Controls

Apply input validation and sanitization to block prototype pollution keys (e.g., toString, valueOf); avoid strict:false subdocuments and application-controlled doc.set calls with untrusted paths; monitor for process crashes and restart as needed; restrict network access to database endpoints.

Threat Intelligence Overview

EPSS Score
0.6%
Top 52% exploitable
Prevalence
High
Mongoose is the dominant Node.js MongoDB ODM, used in vast numbers of backends
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0
CVE-2025-23061 CRITICAL POC
9.0 Jan 15

Mongoose ODM for Node.js before version 8.9.5 contains a search injection vulnerability when using $where filters with p

CVE-2017-2894 CRITICAL POC
9.8 Nov 07

An exploitable stack buffer overflow vulnerability exists in the MQTT packet parsing functionality of Cesanta Mongoose 6

CVE-2017-2891 CRITICAL POC
9.8 Nov 07

An exploitable use-after-free vulnerability exists in the HTTP server implementation of Cesanta Mongoose 6.8. Rated crit

CVE-2017-2922 CRITICAL POC
9.8 Nov 07

An exploitable memory corruption vulnerability exists in the Websocket protocol implementation of Cesanta Mongoose 6.8.

CVE-2017-2921 CRITICAL POC
9.8 Nov 07

An exploitable memory corruption vulnerability exists in the Websocket protocol implementation of Cesanta Mongoose 6.8.

CVE-2023-3696 CRITICAL POC
9.8 Jul 17

Prototype Pollution in GitHub repository automattic/mongoose prior to 7.3.4. Rated critical severity (CVSS 9.8), this vu

CVE-2022-2564 CRITICAL POC
9.8 Jul 28

Prototype Pollution in GitHub repository automattic/mongoose prior to 6.4.6. Rated critical severity (CVSS 9.8), this vu

CVE-2019-19307 CRITICAL POC
9.8 Nov 26

An integer overflow in parse_mqtt in mongoose.c in Cesanta Mongoose 6.16 allows an attacker to achieve remote DoS (infin

CVE-2024-53900 CRITICAL POC
9.1 Dec 02

Mongoose before 8.8.3 can improperly use $where in match, leading to search injection. Rated critical severity (CVSS 9.1

CVE-2021-26530 CRITICAL POC
9.1 Feb 08

The mg_tls_init function in Cesanta Mongoose HTTPS server 7.0 (compiled with OpenSSL support) is vulnerable to remote OO

CVE-2021-26529 CRITICAL POC
9.1 Feb 08

The mg_tls_init function in Cesanta Mongoose HTTPS server 7.0 and 6.7-6.18 (compiled with mbedTLS support) is vulnerable

CVE-2021-26528 CRITICAL POC
9.1 Feb 08

The mg_http_serve_file function in Cesanta Mongoose HTTP server 7.0 is vulnerable to remote OOB write attack via connect

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy