mongodb.mongo-c-driver is vulnerable to Heap-based Buffer Overflow
63
Medium Risk
libbson converts BSON binary fields to JSON by base64-encoding them, and when the JSON output is cut short at a caller-configured length the encoder writes the full encoded remainder instead of the truncated length. The base64 path in common-string.c copies remainder_encoded_len bytes past the destination buffer, corrupting heap memory immediately after the target buffer. Document content passed into the conversion controls the overwritten bytes, giving a limited integrity impact. The fix copies only the truncated remainder length that fits the destination buffer.
You are affected if you are using a version that falls within the vulnerable range and your application produces length-truncated JSON output (for example driver logging) that contains BSON binary fields.
mongodb.mongo-c-driver is vulnerable to Heap-based Buffer Overflow in versions 1.30.0 - 1.30.8 and 2.0.0 - 2.5.1.
Upgrade the mongodb.mongo-c-driver library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.