What’s Vulnerable › Vulnerabilities
CVE-2020-12135
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.2% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2020-04-24 · updated 2026-06-17
- Weakness: CWE-190
Description
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.
Affected products
- MongoDB C# Driver: before 0.8 — fixed in 0.8
- Whoopsie Project Whoopsie: through 0.2.69
How to fix
Upgrade to a fixed version: MongoDB C# Driver 0.8. Check the vendor advisory for mitigations.
References
- https://bugs.launchpad.net/ubuntu/+source/whoopsie/+bug/1872560
- https://github.com/10gen-archive/mongo-c-driver-legacy/commit/1a1f5e26a4309480d88598913f9eebf9e9cba8ca#diff-f7d29a680148f52d6601f59ed787f577
- https://launchpadlibrarian.net/474887364/bson-fix-overflow.patch
- https://usn.ubuntu.com/4450-1/
- https://bugs.launchpad.net/ubuntu/+source/whoopsie/+bug/1872560
- https://github.com/10gen-archive/mongo-c-driver-legacy/commit/1a1f5e26a4309480d88598913f9eebf9e9cba8ca#diff-f7d29a680148f52d6601f59ed787f577
- https://launchpadlibrarian.net/474887364/bson-fix-overflow.patch
- https://usn.ubuntu.com/4450-1/
Get alerted when CVE-2020-12135 or the next vulnerability affects your stack