# CVE-2026-107325: MongoDB Go Driver BSON array validation out-of-bounds

Source: https://junglewise.ai/threats/cve-2026-107325-improper-validation-of-a-bson-array-length-in-the-mongodb-go  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-08. Updated: 2026-10-16  
License: CC BY 4.0 with a link back

CVE-2026-107325 · Severity: medium · CVSS 5.9 · Published 2026-10-08

The MongoDB Go Driver library, which handles binary data serialization in Go applications, contains a flaw in how it validates array length fields. An attacker who supplies malformed array data can crash the application process, causing a denial of service. This affects any Go application using the affected driver versions to parse untrusted BSON data.

Technologies: [MongoDB Go Driver](https://junglewise.ai/threats/technologies/go-driver). Vendors: [MongoDB](https://junglewise.ai/threats/vendors/mongodb).

## Quick answers

**Is CVE-2026-107325 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-107325 being exploited in the wild.

**How severe is CVE-2026-107325?** Medium severity, with a CVSS score of 5.9, published 8 October 2026.

**Which products and versions are affected?** MongoDB Go Driver before 2.9.2.

**Is there a fix for CVE-2026-107325?** Yes: fixed in 2.9.2. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-107325 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-107325?** Check whether you run MongoDB Go Driver at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 2.9.2

## Technical details

The Go Driver's bson.RawArray.Validate, bsoncore.Array.Validate, and bsoncore.NewArrayFromReader functions fail to enforce the 5-byte BSON document minimum before indexing or slicing buffers with a length prefix read from untrusted input. A malformed array declaring a length below 5 bytes causes out-of-bounds array access and runtime panic. The fix validates declared lengths against the 5-byte minimum and returns ErrInvalidLength instead of panicking.

## Affected products

- MongoDB Go Driver before 2.9.2

## Timeline

- 2026-10-08: disclosed: CVE-2026-107325 published
- 2026-09-22: patched: Fix resolved in GODRIVER-4136

## References

- [https://jira.mongodb.org/browse/GODRIVER-4136](https://jira.mongodb.org/browse/GODRIVER-4136)

## Related threats

- [MongoDB Go Driver integer overflow in BSON handling](https://junglewise.ai/threats/cve-2026-107324-an-integer-overflow-in-bson-value-length-handling-in-the-mongodb)
- [MongoDB Go Driver improper neutralization in GridFS delete](https://junglewise.ai/threats/cve-2026-88031-mongodb-go-driver-improper-neutralization-in-gridfs-delete)
- [MongoDB Go Driver namespace injection in BulkWrite](https://junglewise.ai/threats/cve-2026-81521-mongodb-go-driver-namespace-injection-in-bulkwrite)
- [MongoDB mongo-go-driver heap out-of-bounds read in GSSAPI error handling](https://junglewise.ai/threats/cve-2026-2303-mongodb-mongo-go-driver-heap-out-of-bounds-read-in-gssapi-error)
