go.mongodb.org/mongo-driver/v2 is vulnerable to Integer Overflow or Wraparound
82
CVE Score
High
Integer Overflow or Wraparound
The valueLength() function in the BSON core decoder computes a value's length by adding a type's fixed overhead to a length field read from the document bytes. An application or library that validates or reads BSON documents from an external or untrusted source can trigger an integer overflow when the length field is near the int32 maximum. The driver did not check whether the computed length wrapped to a negative number before using it in subsequent length checks, leading to a runtime panic on a negative slice bound. The fix rejects any negative computed length as malformed before it reaches readValue() and ReadElement().
Upgrade the go.mongodb.org/mongo-driver/v2 package to version 2.9.0 or later.
You are affected if you are using a version that falls within the vulnerable range and your application decodes or validates BSON documents originating from an external source.
2.0.0 - 2.8.2
Fixed in 2.9.0go.mongodb.org/mongo-driver/v2 is vulnerable to Integer Overflow or Wraparound in versions 2.0.0 - 2.8.2.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
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.