{"id":"CVE-2021-20329","aliases":["CVE-2021-20329","GHSA-f6mq-5m25-4r72","GO-2021-0112"],"related":[],"kind":"vulnerability","state":"published","title":"Specific cstrings input may not be properly validated in the Go Driver","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Due to improper input sanitization when marshalling Go objects into BSON, a maliciously constructed Go structure could allow an attacker to inject additional fields into a MongoDB document. Users are affected if they use this package to handle untrusted user input.","format":"markdown","source":"go"},{"lang":"es","text":"Es posible que la entrada de cadenas de caracteres específicas no se validen apropiadamente en el controlador MongoDB Go al marshallar objetos Go en BSON. Un usuario malicioso podría usar un objeto Go con una cadena específica para inyectar potencialmente campos adicionales en los documentos ordenados. Este problema afecta a todos los controladores GO de MongoDB hasta (e incluyendo) la versión 1.5.0","source":"nvd"}],"published":"2021-06-10T16:30:11.055Z","modified":"2026-06-17T03:33:41.083Z","severity":{"scorer":"mongodb","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N","score":6.8,"rating":"MEDIUM"},"severities":[{"scorer":"mongodb","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N","score":6.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N","score":6.8,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:N/I:P/A:N","score":4,"rating":"MEDIUM"}],"cwes":["CWE-20","CWE-1287"],"affected":[{"ranges":[{"type":"custom","introduced":"1.0","lastAffected":"1.5.0","status":"affected"}],"vendor":"MongoDB Inc.","product":"MongoDB Go Driver","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.5.1"}],"ecosystem":"Go","package":"go.mongodb.org/mongo-driver","purl":"pkg:golang/go.mongodb.org/mongo-driver","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.5.1"}],"ecosystem":"Go","package":"go.mongodb.org/mongo-driver","purl":"pkg:golang/go.mongodb.org/mongo-driver","source":"go"},{"ranges":[{"status":"affected","lastAffected":"1.5.0"}],"vendor":"mongodb","product":"go_driver","cpe":"cpe:2.3:a:mongodb:go_driver:*:*:*:*:*:mongodb:*:*","source":"nvd"}],"references":[{"url":"https://github.com/mongodb/mongo-go-driver/releases/tag/v1.5.1","tags":["release-notes","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-20329","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/mongodb/mongo-go-driver/pull/622","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/mongodb/mongo-go-driver/commit/2aca31d5986a9e1c65a92264736de9fdc3b9b4ca","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/mongodb/mongo-go-driver","tags":["package"],"sources":["ghsa"]},{"url":"https://jira.mongodb.org/browse/GODRIVER-1923","tags":["web"],"sources":["ghsa","go"]},{"url":"https://pkg.go.dev/vuln/GO-2021-0112","tags":["web"],"sources":["ghsa"]}],"credits":["Hugo Ferrando Seage"],"assigner":"mongodb","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-20329","url":"https://www.cve.org/CVERecord?id=CVE-2021-20329","licence":"CVE Terms of Use","modified":"2024-09-16T22:55:51.498Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-f6mq-5m25-4r72","url":"https://github.com/advisories/GHSA-f6mq-5m25-4r72","licence":"CC-BY-4.0","modified":"2024-09-17T15:38:07.000Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2021-0112","url":"https://pkg.go.dev/vuln/GO-2021-0112","licence":"CC-BY-4.0","modified":"2024-05-20T16:03:47.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-20329","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-20329","licence":"Public domain","modified":"2026-06-17T03:33:41.083Z"}],"updatedAt":"2026-11-25T22:58:01.779Z","epss":{"score":0.011,"percentile":0.66601,"date":"2026-12-01T12:00:22.000Z"}}