Integer Overflow or Wraparound Affecting mongodb/mongo-c-driver package, versions [0,0.8.1)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.13% (49th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-MONGODBMONGOCDRIVER-2366506
  • published26 Jan 2022
  • disclosed24 Apr 2020
  • creditUnknown

Introduced: 24 Apr 2020

CVE-2020-12135  (opens in a new tab)
CWE-190  (opens in a new tab)

How to fix?

Upgrade mongodb/mongo-c-driver to version 0.8.1 or higher.

Overview

Affected versions of this package are vulnerable to Integer Overflow or Wraparound bson before 0.8 incorrectly uses int rather than size_t for many variables, parameters, and return values. In particular, the bson_ensure_space() parameter bytesNeeded could have an integer overflow via properly constructed bson input.

References

CVSS Base Scores

version 3.1