GitHub Advisoryadvisory · Go

GHSA-f6mq-5m25-4r72 go.mongodb.org/mongo-driver improperly validates cstrings when marshalling Go objects into BSON

MEDIUM Published 2021-06-15 Modified 2024-09-17 Official page ↗
Aliases
CVE-2021-20329
Ecosystem
Go
Packages
go.mongodb.org/mongo-driver
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
Weaknesses
CWE-1287, CWE-20
Reviewed
2021-06-14

Affected packages

• Go go.mongodb.org/mongo-driver: < 1.5.1 → 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 up to (and including) 1.5.0.

Related

Alias · CVE (1)

  • CVE-2021-20329 Specific cstrings input may not be properly validated in the MongoDB Go Driver when marshalling Go objects into BSON. vulnerability

Weakness · CWE (2)

  • CWE-1287 Improper Validation of Specified Type of Input weakness
  • CWE-20 Improper Input Validation weakness

References