Skip to content
Fencer Vulns
medium 5.5

CVE-2020-12135 json

bson before 0.8 incorrectly uses int rather than size_t for many variables, parameters, and return values.

published 2020-04-24 6 y ago modified 2026-06-17 4 mo ago also EUVD-2020-4450

cvss
5.5
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
1.2%
EPSS 1.2% chance of exploitation in 30 days, percentile 67%
public exploits
0
none known

Summary

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.

Patch / fix

  • mongodb c_driver 0.8
  • whoopsie Ubuntu 16.04 LTS 0.2.52.5ubuntu0.5
  • whoopsie Ubuntu 18.04 LTS 0.2.62ubuntu0.5
  • whoopsie Ubuntu 20.04 LTS 0.2.69ubuntu0.1

ubuntu advisories UBUNTU-CVE-2020-12135

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2020-12135 updated cvss 5.5

bson: integer overflow in bson_ensure_space() parameter bytesNeeded

  • Red Hat Fuse 7 bson Red Hat OpenShift Application Runtimes bson Red Hat Software Collections rh-mongodb34-libbson, rh-mongodb36-libbson, rh-mongodb34-mongo-c-driver, rh-mongodb36-mongo-c-driver, rh-mongodb34-mongo-c-driver-libs, rh-mongodb36-mongo-c-driver-libs
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

1.17% chance of exploitation in the next 30 days, higher than 67% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • bugs.launchpad.net https://bugs.launchpad.net/ubuntu/+source/whoopsie/+bug/1872560 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 5.5 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD 2.0 4.3 AV:N/AC:M/Au:N/C:N/I:N/A:P

Classification

Weakness
  • CWE-190 Integer Overflow or Wraparound

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.