GitHub Advisory Database
GHSA-cp6g-7hqx-qxhp
mongo-go-driver has Heap Out-of-Bounds Read in GSSAPI Error Handling
Details
The mongo-go-driver repository contains CGo bindings for GSSAPI (Kerberos) authentication on Linux and macOS. The C wrapper implementation contains a heap out-of-bounds read vulnerability due to incorrect assumptions about string termination in the GSSAPI standard. Since GSSAPI buffers are not guaranteed to be null-terminated or have extra padding, this results in reading one byte past the allocated heap buffer.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Go | go.mongodb.org/mongo-driver | All versions before 1.17.7 (fixed in 1.17.7) |
| Go | go.mongodb.org/mongo-driver/v2 | All versions before 2.4.2 (fixed in 2.4.2) |