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

Published Dec 2, 2026
·
Updated

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. From 6.3.5 until 6.13.13, Mongoose treats a plain object with an own bsontype property as a BSON value, allowing forged ObjectID values to replay an identifier from a preceding database command when that command has a compatible layout and buffer offset, or to store and disclose other command-buffer fragments, while forged BSONRegExp values bypass String-path filtering. Applications that pass request-derived values into ObjectId or String queries and writes can consequently read, modify, or delete documents accessed by another request under the compatible-layout condition, store and disclose fragments such as reset codes or API keys without that identifier-replay condition, or execute unintended regular-expression matches even when sanitizeFilter or common MongoDB sanitizers are enabled. This issue is fixed in version 6.13.13.

Affected Software

1 affected component
npm/mongoose>=6.3.5<6.13.13

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 6.13.13

Event History

Dec 2, 2026
CVE Published
via MITRE·10:09 PM
Data Sourced
via MITRE·10:09 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed in practice?

Applications using Mongoose versions from 6.3.5 through 6.13.12 are exposed if they pass request-derived values into queries or writes for ObjectId or String paths. No authentication or user interaction is required according to the supplied vector.

2

Do filter sanitizers prevent exploitation?

No. Forged BSONRegExp values can bypass String-path filtering even when sanitizeFilter or common MongoDB sanitizers are enabled.

3

What could happen if an attacker supplies a forged value?

Under a compatible command layout and buffer offset, a forged ObjectID can replay an identifier from a preceding database command, potentially allowing reads, modifications, or deletions of documents accessed by another request. Forged values may also cause command-buffer fragments, including reset codes or API keys, to be stored or disclosed.

4

What version fixes the issue?

Upgrade to Mongoose 6.13.13, which is identified as the fixed version.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203