# CVE-2021-20329: Specific cstrings input may not be properly validated in the Go Driver

- Severity: Medium 6.8 (CVSS:3.1, scored by mongodb) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.10%, higher than 66% of CVEs (2026-12-01)
- Published: 2021-06-10T16:30:11.055Z
- Modified: 2026-06-17T03:33:41.083Z
- Also known as: GHSA-f6mq-5m25-4r72, GO-2021-0112
- Weaknesses: CWE-20, CWE-1287
- Assigned by: mongodb

## Description

Specific cstrings input may not be properly validated in the MongoDB Go Driver when marshalling Go objects into BSON. A malicious user could use a Go object with specific string to potentially inject additional fields into marshalled documents. This issue affects all MongoDB GO Drivers prior to and including 1.5.0.

(As written by CVE List.)

## Affected

- MongoDB Inc. MongoDB Go Driver: from 1.0 up to 1.5.0
- go.mongodb.org/mongo-driver (Go): before 1.5.1
- mongodb go_driver: up to 1.5.0

## Every score

- mongodb: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 4.0 Medium `AV:N/AC:L/Au:S/C:N/I:P/A:N`

## References

- <https://github.com/mongodb/mongo-go-driver/releases/tag/v1.5.1> (release-notes, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-20329> (advisory)
- <https://github.com/mongodb/mongo-go-driver/pull/622> (fix, web)
- <https://github.com/mongodb/mongo-go-driver/commit/2aca31d5986a9e1c65a92264736de9fdc3b9b4ca> (fix, web)
- <https://github.com/mongodb/mongo-go-driver> (package)
- <https://jira.mongodb.org/browse/GODRIVER-1923> (web)
- <https://pkg.go.dev/vuln/GO-2021-0112> (web)

## Sources

- CVE List: [CVE-2021-20329](https://www.cve.org/CVERecord?id=CVE-2021-20329), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-f6mq-5m25-4r72](https://github.com/advisories/GHSA-f6mq-5m25-4r72), CC-BY-4.0, modified 2024-09-17
- Go Vulnerability Database: [GO-2021-0112](https://pkg.go.dev/vuln/GO-2021-0112), CC-BY-4.0, modified 2024-05-20
- NVD: [CVE-2021-20329](https://nvd.nist.gov/vuln/detail/CVE-2021-20329), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-20329 · Whole record: https://cve.day/CVE-2021-20329.json · Rebuilt by cve.day 2026-11-25T22:58:01.779Z
