Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
MEDIUM severity

CVE-2021-20329 — mongo-driver

MEDIUMFix: mongodb/mongo-go-driver#622

CVE-2021-20329 is a medium-severity (CVSS 6.5) CWE-1287 vulnerability in go.mongodb.org/mongo-driver. A fix is available for go.mongodb.org/mongo-driver — see the affected versions and patch details below.

go.mongodb.org/mongo-driver improperly validates cstrings when marshalling Go objects into BSON

Also known asGHSA-f6mq-5m25-4r72GO-2021-0112
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 9, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.9%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs60th percentile — riskier than 60% of all scored CVEsHighest risk
0.00%0.49%0.97%1.46%0.1%0.9%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2021-20329 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,987 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
🐹go.mongodb.org/mongo-driver

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogo.mongodb.org/mongo-driverall versions1.5.1go get go.mongodb.org/mongo-driver@v1.5.1

Affected Products

1 product · 1 configurations
Application
go drivermongodb
≤ 1.5.0
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for go.mongodb.org/mongo-driver, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update go.mongodb.org/mongo-driver to 1.5.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-20329 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate
ProductFixed inAdvisory
Red Hat OpenShift Container Platform 4.10openshift4/ose-csi-driver-nfs-rhel8:v4.10.0-202303210741.p0.ge6b5664.assembly.streamRHSA-2023:1392
Red Hat OpenShift Container Platform 4.10openshift4/ose-csi-driver-manila-rhel8-operator:v4.10.0-202304031241.p0.g3b06768.assembly.streamRHSA-2023:1656
Red Hat OpenShift Container Platform 4.11openshift4/ose-csi-driver-manila-rhel8-operator:v4.11.0-202303240327.p0.gce6c43b.assembly.streamRHSA-2023:1504
Red Hat OpenShift Container Platform 4.12openshift4/ose-csi-driver-manila-rhel8-operator:v4.12.0-202303210718.p0.gaf25a1f.assembly.streamRHSA-2023:1409
Red Hat OpenShift Container Platform 4.13openshift4/ose-baremetal-machine-controllers:v4.13.0-202305030754.p0.gd20bc57.assembly.streamRHSA-2023:1326
Red Hat OpenShift Container Platform 4.13openshift4/ose-kubernetes-nmstate-handler-rhel8:v4.13.0-202304280215.p0.gc254e6e.assembly.streamRHSA-2023:1328
Red Hat OpenShift Container Platform 4.13openshift4/dpu-network-rhel8-operator:v4.13.0-202308221627.p0.g35cbabd.assembly.streamRHSA-2023:4730
Red Hat OpenShift Container Platform 4.13openshift4/ose-operator-lifecycle-manager:v4.13.0-202401092010.p0.g2357f75.assembly.streamRHSA-2024:0193

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2021-20329 in your dependencies?

Find it across Go, including transitive dependencies.

CVE-2021-20329: mongo-driver — Fixed in 1.5.1