CVE-2021-20329: Specific cstrings input may not be properly validated in the Go Driver
A flaw was found in Mongo. Specific cstrings input may not be properly validated in the MongoDB Go Driver when marshaling Go objects into BSON. This flaw allows a malicious user to use a Go object with a specific string to inject additional fields into marshaled documents.
Other sources
MongoDB Go Driver could allow a remote authenticated attacker to bypass security restrictions, caused by improper input validation of cstrings when marshalling Go objects into BSON. By sending a specially-crafted Go object with specific string, an attacker could exploit this vulnerability to inject additional fields into marshalled documents.
— IBM
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.
— MITRE
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 up to (and including) 1.5.0.
Affected Software
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2021-20329?
The severity of CVE-2021-20329 is medium with a CVSS score of 6.8.
How does CVE-2021-20329 affect MongoDB Go Driver?
CVE-2021-20329 affects all MongoDB Go Drivers up to version 1.5.1.
What is the impact of CVE-2021-20329?
CVE-2021-20329 could allow a malicious user to inject additional fields into marshalled MongoDB documents.
How can I fix CVE-2021-20329 in MongoDB Go Driver?
To fix CVE-2021-20329 in MongoDB Go Driver, update to version 1.5.1 or later.
Where can I find more information about CVE-2021-20329?
More information about CVE-2021-20329 can be found at the following references: [NVD](https://nvd.nist.gov/vuln/detail/CVE-2021-20329), [GitHub Release](https://github.com/mongodb/mongo-go-driver/releases/tag/v1.5.1), [GitHub Pull Request](https://github.com/mongodb/mongo-go-driver/pull/622).