Intel

AIKIDO-2026-135360

mongodb.mongo-c-driver is vulnerable to Integer Overflow or Wraparound

Integer Overflow or WraparoundCVE-2026-84965 Published 3 days ago

59

Medium Risk

This Affects:

C++mongodb.mongo-c-driver
1.10.0 - 1.30.8
Fixed in 1.30.9
2.0.0 - 2.5.1
Fixed in 2.5.2
Are you affected? Scan for Free

TL;DR

libbson grows internal buffers with bson_next_power_of_two and unchecked size arithmetic during JSON parsing and array append. On 32-bit builds a sufficiently large input makes the size computation wrap to a smaller value, so the buffer is reallocated (and the old buffer freed) while a subsequent copy still writes through the stale, undersized pointer. Externally supplied JSON of sufficient size then crashes the process. The fix saturates the power-of-two growth at SIZE_MAX and adds checked add and multiply helpers before allocation.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you run a 32-bit build that parses externally influenced JSON input.

Background info

mongodb.mongo-c-driver is vulnerable to Integer Overflow or Wraparound in versions 1.10.0 - 1.30.8 and 2.0.0 - 2.5.1.

How to fix this

Upgrade the mongodb.mongo-c-driver library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform