Intel

AIKIDO-2026-138964

go.mongodb.org/mongo-driver/v2 is vulnerable to Integer Overflow or Wraparound

CVE-2026-107324Published Oct 31, 2026
October 31, 2026

82

CVE Score

High

Integer Overflow or Wraparound

Are you affected? Scan for Free

TL;DR

The valueLength() function in the BSON core decoder computes a value's length by adding a type's fixed overhead to a length field read from the document bytes. An application or library that validates or reads BSON documents from an external or untrusted source can trigger an integer overflow when the length field is near the int32 maximum. The driver did not check whether the computed length wrapped to a negative number before using it in subsequent length checks, leading to a runtime panic on a negative slice bound. The fix rejects any negative computed length as malformed before it reaches readValue() and ReadElement().

How do I fix this?

Upgrade the go.mongodb.org/mongo-driver/v2 package to version 2.9.0 or later.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application decodes or validates BSON documents originating from an external source.

Versions

2.0.0 - 2.8.2

Fixed in 2.9.0

Background info

go.mongodb.org/mongo-driver/v2 is vulnerable to Integer Overflow or Wraparound in versions 2.0.0 - 2.8.2.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea