GHSA-5chr-phc4-wcj2: NoSQL command injection via mismatched raw BSON length prefix written verbatim to the wire

Published Oct 22, 2026
·
Updated

A data-validation flaw exists in the BSON handling and binary serialization path of the MongoDB C# Driver. When an application constructs a raw or lazy BSON document object from externally supplied binary data, the driver does not verify that the size quantity declared inside that data matches the amount of data actually provided, and it copies the data onto the wire unchanged. An unauthenticated party who can supply binary content to such an application can thereby cause additional elements to be inserted into, or existing elements to be removed from, the database command the application issues, without needing any database credentials of their own. This can result in unauthorized modification of stored data and disclosure of data outside the intended scope of the application's request, bounded by the database privileges the application itself holds.

Affected Software

1 affected component
MongoDB MongoDB C# Driver

Event History

Oct 22, 2026
CVE Published
via OSV·07:13 PM
Data Sourced
via OSV·07:13 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using the MongoDB C# Driver are exposed only when they construct a raw or lazy BSON document from externally supplied binary data. The issue is reachable by an unauthenticated party able to provide that binary content to the application.

2

Does an attacker need MongoDB credentials or direct database access?

No. Exploitation does not require database credentials; the attacker needs a path to supply crafted binary BSON data that the application turns into a raw or lazy BSON document. The resulting database action is limited by the privileges of the application's own database identity.

3

Are default driver configurations affected?

The available information does not identify a default configuration as affected. Exposure depends on the application using externally supplied binary data to construct raw or lazy BSON documents.

4

What could indicate that an application has been affected?

Potential indicators include database commands whose inserted or removed elements differ from the application's intended request, along with unauthorized data changes or data returned outside the expected request scope. Review code paths that accept binary input and pass it into raw or lazy BSON document construction.

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