CVE Professor
/
All CVEs
CVE-2026-142608

CVE-2026-142608 — Mongoose — CWE-843

LOW CVSS 0 ⚡ EPSS 0.6% GitHub

### Summary From 6.3.5-6.13.12, Mongoose 6 decides whether a value is a BSON type by checking only its _bsontype property. A plain object such as {"_bsontype":"ObjectID","id":""} therefore passes the ObjectId cast. bson 4.x then writes no id bytes but still advances 12 bytes in its serialization buffer, so the value sent to MongoDB is whatever the previous command left at that offset. Request bodies, cookies and Express 4 query strings can all produce such an object. sanitizeFilter doesn’t catch it because it has no $ keys. ### Details `lib/helpers/isBsonType.js` returned true for any object whose `_bsontype` matched. This led to three problems: 1. Queries by id replay another request’s id. findById(forged) sends the `_id` from the last command with the same layout, such as another request’s `findById` on the same collection. Likewise, `findByIdAndDelete(forged)` and `findByIdAndUpdate(forged)` act on the document another request just modified with `findOneAndUpdate`. This works with `sanitizeFilter` on. 2. Stored ObjectIds leak command bytes. `create()`, `$set` and other writes store 12 bytes of earlier commands, such as filter values and updated fields. Anyone who can read the document can read those bytes. This happens in the default configuration. 3. Forged regexes on String paths. `{"_bsontype":"BSONRegExp","pattern":"^a","options":""}` passes the String query cast and is sent as a regular expression, bypassing sanitizeFilter. `mongoose.isObjectIdOrHexString()

### Summary From 6.3.5-6.13.12, Mongoose 6 decides whether a value is a BSON type by checking only its _bsontype property. A plain object such as {"_bsontype":"ObjectID","id":""} therefore passes the ObjectId cast. bson 4.x then writes no id bytes but still advances 12 bytes in its serialization buffer, so the value sent to MongoDB is whatever the previous command left at that offset. Request bodies, cookies and Express 4 query strings can all produce such an object. sanitizeFilter doesn’t catch it because it has no $ keys. ### Details `lib/helpers/isBsonType.js` returned true for any object whose `_bsontype` matched. This led to three problems: 1. Queries by id replay another request’s id. findById(forged) sends the `_id` from the last command with the same layout, such as another request’s `findById` on the same collection. Likewise, `findByIdAndDelete(forged)` and `findByIdAndUpdate(forged)` act on the document another request just modified with `findOneAndUpdate`. This works with `sanitizeFilter` on. 2. Stored ObjectIds leak command bytes. `create()`, `$set` and other writes store 12 bytes of earlier commands, such as filter values and updated fields. Anyone who can read the document can read those bytes. This happens in the default configuration. 3. Forged regexes on String paths. `{"_bsontype":"BSONRegExp","pattern":"^a","options":""}` passes the String query cast and is sent as a regular expression, bypassing sanitizeFilter. `mongoose.isObjectIdOrHexString()

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality None C:N
Integrity None I:N
Availability None A:N
EPSS — Exploit Prediction Scoring System
0.6%
30-day probability
In the 49. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-142608
CVSS 0/10 · LOW · 02.12.2026
CWE: CWE-843
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 WHAT IS THIS VULNERABILITY?
Summary: ### Summary

From 6.3.5-6.13.12, Mongoose 6 decides whether a value is a BSON type by checking only its _bsontype property. A plain object such as {"_bsontype":"ObjectID","id":""} therefore passes the ObjectId cast. bson 4.x then writes no id bytes but still advances 12 bytes in its serialization buffer, so the value sent to MongoDB is whatever the previous command left at that offset.
Affected: mongoose

⚡ ATTACK VECTOR
Network / Remote (AV:N) · no authentication required (PR:N) · no user interaction (UI:N) · low attack complexity (AC:L).

🌍 REAL WORLD IMPACT
Partial confidentiality disclosure (C:L).

🛡️ REMEDIATION
→ Apply vendor security update for mongoose.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.

⚠️ URGENCY
📌 Low priority — routine update sufficient.

────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="MongoDB"
CVSS Score
0 / 10 · CVSS LOW
Weakness Types (CWE)
CWE-843
Affected Products (1)
mongoose
References & Advisories (3)
Related CVEs
5.3
CVE-2026-144571
Payload 3.86.0 before 3.94.2 and 4.0.0-beta.1 before 4.0.0-beta.12 contains an access control bypass in the Mo
6.3
CVE-2026-144592
PrivateBin through 2.1.1 contains a race condition vulnerability in Paste::get() that allows a burn-after-read
6.3
CVE-2026-145357
Metorial Platform through commit 1b5ff9b contains an egress policy bypass vulnerability in the MCP runtime OAu
5.1
CVE-2026-144610
Fuint through commit 567e2c8 contains an insecure direct object reference vulnerability that allows authentica
5.1
CVE-2026-144612
modified eCommerce Shopsoftware through 3.3.0 contains a path traversal vulnerability in the download action o
5.1
CVE-2026-144512
A flaw has been found in Discourse up to 2026.9.0. Affected is the function TopicConverter#convert_to_private_
4.8
CVE-2025-71478
Zipware for Windows through 1.6 contains a Mark-of-the-Web bypass vulnerability because it does not propagate