VDB
Sign up
HIGH8.1

GHSA-65fr-j4p9-vc33

mongodb: Reject "." and NUL bytes in database and collection names

Quick fix

GHSA-65fr-j4p9-vc33 — mongodb/mongodb: upgrade to the fixed version with the command below.

composer require mongodb/mongodb:^1.21.4

Details

### Impact Passing untrusted input as part of a database or collection name may result in targeting a different database or collection than specified.

### Patches Fixed in PHP library 1.21.4 and 2.4.1.

### Workarounds Validate database and collection names prior to passing into APIs.

Are you affected?

Enter the version of the package you're using.

Affected packages

Packagist/mongodb/mongodb
Introduced in: 0Fixed in: 1.21.4
Fixcomposer require mongodb/mongodb:^1.21.4
Packagist/mongodb/mongodb
Introduced in: 2.0.0Fixed in: 2.4.1
Fixcomposer require mongodb/mongodb:^2.4.1

References