mongodb.mongo-c-driver is vulnerable to Numeric Truncation Error
63
Medium Risk
libbson parses JSON into BSON and reads value lengths as size_t while later handling them as int. When an input value is unusually large, bson-json.c narrows the length without an in-range check, so fields can be silently truncated or omitted while parsing still reports success. Externally supplied JSON then yields a BSON document that differs from what was submitted. The fix validates that lengths fit int with mcommon_in_range_unsigned before use and rejects oversized values.
You are affected if you are using a version that falls within the vulnerable range and you parse externally influenced JSON into BSON.
mongodb.mongo-c-driver is vulnerable to Numeric Truncation Error in versions 1.10.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.