home / blog
2026-11-27 · medium
CVE-2021-20329: MongoDB Go Driver Vulnerability
CVE-2021-20329: Injection vulnerability in MongoDB Go Driver. CVSS 6.8. PoC available.

CVE-2021-20329 concerns a vulnerability in the MongoDB Go Driver where specific input strings are not properly validated during the marshalling of Go objects into BSON. This allows a malicious user to inject additional fields into marshalled documents, potentially altering data or application behavior.
The vulnerability severity is rated as Medium with a CVSS score of 6.8. Officially published in NVD on 10/06/2021, with recent signals indicating the presence of a Proof of Concept on GitHub, suggesting a potential increase in exploitation risk.
In defense, it is crucial to immediately update the MongoDB Go Driver to a version later than 1.5.0. For organizations that cannot update immediately, implement additional validation controls on data before marshalling and monitor for suspicious activity on applications using the vulnerable driver.
At a glance
- What
- Specific cstrings input are not properly validated in the MongoDB Go Driver when marshalling Go objects into BSON, allowing for additional field injection.
- Severity
- Medium (CVSS 6.8)
- Affected versions
- All MongoDB GO Driver versions prior to and including 1.5.0
- Fix
- Update the MongoDB Go Driver to a version later than 1.5.0
- Status
- Vulnerability officially published in NVD on 10/06/2021
- Action
- Immediately update the MongoDB Go Driver to a version later than 1.5.0
Sources: NVD, CVE-2021-20329