Critical Deserialization Vulnerability in Node-MongoDB Package

node-mongodb Updated 02 Oct 2025

Summary

30/03/2020
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2020-7610: All versions of bson before 1.1.4 are vulnerable to Deserialization of Untrusted Data. Affects node-mongodb versions < 3.5.6+~cs11.12.19-1. Fixed in 3.5.6+~cs11.12.19-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Node-MongoDB is a widely used package that facilitates interaction between Node.js applications and MongoDB databases. It provides a robust API for performing CRUD operations and managing database connections. However, it has been identified that all versions of bson prior to 1.1.4 are susceptible to a critical vulnerability that allows for the deserialization of untrusted data, potentially leading to severe security issues.

Vulnerability Detail

The vulnerability arises from the package's handling of BSON types. Specifically, it ignores unknown values for an object's _bsotype, which can result in an object being serialized as a document instead of the intended BSON type. This flaw can be exploited by attackers to manipulate data structures, leading to unauthorized access or data corruption.

How To Fix

Minimum fixed version

3.5.6+~cs11.12.19-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-mongodb

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can implement input validation to ensure that only trusted data is processed. This can help mitigate the risk of deserialization attacks until the package is updated.

Conclusion

The node-mongodb package has a critical vulnerability related to deserialization of untrusted data, affecting all versions prior to 1.1.4. It is crucial to update to the patched version to safeguard your applications from potential exploits. Implementing input validation can serve as a temporary workaround until the update is applied.

See every vulnerability recorded for node-mongodb →

Share this vulnerability

FAQ

The vulnerability is a deserialization issue that allows untrusted data to be processed, potentially leading to data manipulation or unauthorized access.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

Exploitation of this vulnerability could lead to data corruption, unauthorized access to sensitive information, and potential system compromise.

Yes, a patched version of the node-mongodb package is available. You should update to version 3.5.6+~cs11.12.19-1 or later.

If an immediate update is not possible, implement input validation to restrict the processing of untrusted data as a temporary measure.

Related vulnerabilities

Recent vulnerabilities recorded for node-mongodb.

How To Fix

Minimum fixed version

3.5.6+~cs11.12.19-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-mongodb

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback