# CVE-2021-20329: GO-2021-0112 - Improper input validation in go.mongodb.org/mongo-driver

Source: https://junglewise.ai/threats/cve-2021-20329-go-mongodb-org-mongo-driver-improperly-validates-cstrings-when  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-07-28  
License: CC BY 4.0 with a link back

CVE-2021-20329 · Severity: low · CVSS 3.1 · Published 2021-07-28

Improper input validation in go.mongodb.org/mongo-driver

Technologies: [go.mongodb.org/mongo-driver (Go)](https://junglewise.ai/threats/technologies/go-mongodb-org-mongo-driver). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2021-20329 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-20329 being exploited in the wild.

**How severe is CVE-2021-20329?** Low severity, with a CVSS score of 3.1, published 28 July 2021.

**Which products and versions are affected?** go.mongodb.org/mongo-driver (Go) SEMVER:introduced=0,fixed=1.5.1.

**Is there a fix for CVE-2021-20329?** Yes. go.mongodb.org/mongo-driver (Go): upgrade to 1.5.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-20329?** Check whether you run go.mongodb.org/mongo-driver (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- go.mongodb.org/mongo-driver (Go): upgrade to 1.5.1 or later

  ```sh
  go get go.mongodb.org/mongo-driver@v1.5.1
  ```


## Affected products

- go.mongodb.org/mongo-driver (Go) SEMVER:introduced=0,fixed=1.5.1

## Identifiers

- CVE-2021-20329
- GHSA-f6mq-5m25-4r72
- GO-2021-0112

## Related threats

- [MongoDB mongo-go-driver heap out-of-bounds read in GSSAPI error handling](https://junglewise.ai/threats/cve-2026-2303-mongodb-mongo-go-driver-heap-out-of-bounds-read-in-gssapi-error)
- [GO-2021-0111 - Due to improper input sanitization when marshalling Go objects into BSON, a maliciously constructed Go…](https://junglewise.ai/threats/go-2021-0111-due-to-improper-input-sanitization-when-marshalling-go-8c92c5e4)
