Skip to main content
Menu
Advisories

PYTHON-6256 Out-of-bounds read in BSON array decoding

GHSA-76F6-683G-W69PPublished Updated GitHub

Description

An out-of-bounds read in the native C BSON decoding extension of the MongoDB Python Driver may allow an unauthenticated party who can supply crafted BSON data to the decoder to cause the application process to terminate. In some configurations, nearby process memory may be included in error messages, which may result in limited unintended disclosure of data.

Details

See jira.mongodb.org/browse/PYTHON-6256

Proof of concept

See jira.mongodb.org/browse/PYTHON-6256 for full details. Requires address-santizer-enabled version of CPython to generate the address sanitizer error.

Impact

The read is out of bounds: 4 to 8 bytes past the input allocation. On default builds the over-read value is discarded and decode() raises InvalidBSON; under hardened allocators the read aborts the process.

Affected versions

References

GitHub · mongodb/mongo-python-driver