The mongodb npm package, specifically versions 2.0.48 and 2.0.47, serves as a legacy driver emulation layer built upon the mongodb-core package, offering developers a familiar interface for interacting with MongoDB databases. Both versions share a similar foundation, utilizing dependencies like es6-promise for asynchronous operations and readable-stream for handling streams of data. They also leverage comparable development dependencies for tasks such as code generation, testing, and documentation. The key difference resides in the underlying mongodb-core dependency. Version 2.0.48 depends on mongodb-core version 1.2.21, while version 2.0.47 relies on mongodb-core version 1.2.20.
This seemingly minor version bump in mongodb-core can bring bugfixes, performance improvements, or new features within the core driver that trickle up to the mongodb package. Developers should investigate the changelog of mongodb-core 1.2.21 to understand precisely what changed. The updates in the core driver could resolve compatibility issues, enhance stability, or provide new functionalities, thereby impacting how the mongodb package interacts with MongoDB servers. Given the close relationship between the two packages, this update is likely the most important factor for developers to evaluate. While the development dependencies such as co, bson, and bluebird remain the same, indicating no significant changes in the development tooling or environment, developers interested in the most robust and up-to-date interaction with their MongoDB databases should consider upgrading to version 2.0.48.
All the vulnerabilities related to the version 2.0.48 of the package
Denial of Service in mongodb
Versions of mongodb
prior to 3.1.13 are vulnerable to Denial of Service. The package fails to properly catch an exception when a collection name is invalid and the DB does not exist, crashing the application.
Upgrade to version 3.1.13 or later.
Deserialization of Untrusted Data in bson
Incorrect parsing of certain JSON input may result in js-bson not correctly serializing BSON. This may cause unexpected application behaviour including data disclosure.
Deserialization of Untrusted Data in bson
All versions of bson before 1.1.4 are vulnerable to Deserialization of Untrusted Data. The package will ignore an unknown value for an object's _bsontype, leading to cases where an object is serialized as a document rather than the intended BSON type.