CVE Feed
0.0 Unscored

Mongoose: Plain objects with a forged _bsontype bypass ObjectId and String casting, leaking and replaying data from other command

CVE-2026-142608

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.…

Assessment

CVSS
0 (v3.1)
Severity
Unscored
EPSS
0.00573% chance of exploitation in the next 30 days
Known exploited
Not listed in CISA KEV
Exploit availability
Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
Published
3 December 2026
Last updated
3 December 2026
Weakness
CWE-843
Assigner
security-advisories@github.com

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

At the source

References

Community proofs of concept

No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.

Submit a proof of concept
Before you submit *

Query this programmatically

Agents can read this through the MCP endpoint, or over HTTP:

curl https://cve.zerocrew.in/api/cve/CVE-2026-142608