CVE-2020-7610: Deserialization of Untrusted Data in bson

bson Updated 02 Oct 2025

Summary

07/05/2021
Yes i
Critical
9.8

CVE-2020-7610: Deserialization of Untrusted Data in bson. Affects bson versions < 1.1.4. Fixed in 1.1.4. How to fix ↓

Also tracked for

The same CVE-2020-7610 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The bson package is an npm package used for working with BSON (Binary JSON) data in JavaScript. BSON is a binary representation of JSON-like documents, commonly used in MongoDB. The package provides functions for serializing and deserializing BSON data. However, all versions of bson before 1.1.4 are vulnerable to Deserialization of Untrusted Data. This vulnerability occurs when the package ignores an unknown value for an object's _bsontype, causing an object to be serialized as a document instead of the intended BSON type.

Vulnerability Detail

The vulnerability in bson allows an attacker to provide malicious input that can be deserialized by the package. By exploiting this vulnerability, an attacker can potentially execute arbitrary code or perform other malicious actions on the system. The impact of this vulnerability can be severe, as it allows for remote code execution and unauthorized access to sensitive data. The vulnerability has a CVSS score of 9.8, indicating its critical severity.

How To Fix

Latest published version: 7.3.3 as of 22 Oct 2026

npm install bson@7.3.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.1.4

This is the first release that contains the fix.

npm install bson@1.1.4

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

Workaround

There is no known workaround for this vulnerability. It is essential to upgrade to the fixed version of bson to mitigate the risk.

Conclusion

The bson package before version 1.1.4 is vulnerable to Deserialization of Untrusted Data. This vulnerability can lead to remote code execution and unauthorized access to sensitive data. It is crucial to upgrade to bson version 1.1.4 or later to mitigate the risk. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for bson →

Share this vulnerability

FAQ

BSON is a binary representation of JSON-like documents, commonly used in MongoDB. The bson package provides functions for working with BSON data in JavaScript.

The vulnerability allows for remote code execution and unauthorized access to sensitive data. An attacker can exploit this vulnerability to execute arbitrary code or perform other malicious actions on the system.

To fix this vulnerability, you need to upgrade to bson version 1.1.4 or later. Update your package.json file to specify the latest version of bson as a dependency and install the updated version using the package manager.

No, there is no known workaround for this vulnerability. It is crucial to upgrade to the fixed version of bson to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for bson.

How To Fix

Latest published version: 7.3.3 as of 22 Oct 2026

npm install bson@7.3.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.1.4

This is the first release that contains the fix.

npm install bson@1.1.4

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