go.mongodb.org/mongo-driver improperly validates cstrings when marshalling Go objects into BSONGHSA-f6mq-5m25-4r72
MEDIUMFix: mongodb/mongo-go-driver#622GHSA-f6mq-5m25-4r72 is a medium-severity (CVSS 6.8) 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.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-f6mq-5m25-4r72 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
go.mongodb.org/mongo-driverReal-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
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | go.mongodb.org/mongo-driver | all versions | 1.5.1go get go.mongodb.org/mongo-driver@v1.5.1 |
Affected Products
go drivermongodbDetection & mitigation playbook
Open-source dependencyDetect
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.
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 GHSA-f6mq-5m25-4r72 is resolved across your whole dependency graph.
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.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat OpenShift Container Platform 4.10 | openshift4/ose-csi-driver-nfs-rhel8:v4.10.0-202303210741.p0.ge6b5664.assembly.stream | RHSA-2023:1392 |
| Red Hat OpenShift Container Platform 4.10 | openshift4/ose-csi-driver-manila-rhel8-operator:v4.10.0-202304031241.p0.g3b06768.assembly.stream | RHSA-2023:1656 |
| Red Hat OpenShift Container Platform 4.11 | openshift4/ose-csi-driver-manila-rhel8-operator:v4.11.0-202303240327.p0.gce6c43b.assembly.stream | RHSA-2023:1504 |
| Red Hat OpenShift Container Platform 4.12 | openshift4/ose-csi-driver-manila-rhel8-operator:v4.12.0-202303210718.p0.gaf25a1f.assembly.stream | RHSA-2023:1409 |
| Red Hat OpenShift Container Platform 4.13 | openshift4/ose-baremetal-machine-controllers:v4.13.0-202305030754.p0.gd20bc57.assembly.stream | RHSA-2023:1326 |
| Red Hat OpenShift Container Platform 4.13 | openshift4/ose-kubernetes-nmstate-handler-rhel8:v4.13.0-202304280215.p0.gc254e6e.assembly.stream | RHSA-2023:1328 |
| Red Hat OpenShift Container Platform 4.13 | openshift4/dpu-network-rhel8-operator:v4.13.0-202308221627.p0.g35cbabd.assembly.stream | RHSA-2023:4730 |
| Red Hat OpenShift Container Platform 4.13 | openshift4/ose-operator-lifecycle-manager:v4.13.0-202401092010.p0.g2357f75.assembly.stream | RHSA-2024:0193 |
Frequently Asked Questions
Is GHSA-f6mq-5m25-4r72 in your dependencies?
Find it across Go, including transitive dependencies.