CVE-2020-7610: Bson Deserialization Of Untrusted Data Vulnerability
CRITICALCVE-2020-7610 is a CRITICAL (CVSS 9.8) deserialization of untrusted data vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Bson libraries in the npm ecosystem. The issue involves deserialization of untrusted data in bson. Remediation is available by upgrading affected packages to version 1.1.4.
CVE-2020-7610 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2020-7610
To remediate this vulnerability, upgrade all affected Bson dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install bson@1.1.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls bson
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-7610, inspect your project dependencies using npm:
npm ls bson
Analyze the terminal output to locate any version of Bson in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.4), your application is affected.
Note: The npm ls bson command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Bson, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-7610 Affected Bson Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
bson
|
npm |
< 1.1.4
|
1.1.4
|
References
Frequently Asked Questions
What is CVE-2020-7610?
Which Bson versions are affected?
What version fixes CVE-2020-7610?
Is bson affected?
What is the CVSS score of CVE-2020-7610?
What CWE is associated with CVE-2020-7610?
How can I check npm dependencies for CVE-2020-7610?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v8w9-2789-6hhr",
"modified" : "2023-03-30T22:46:24Z",
"published" : "2021-05-07T16:04:54Z",
"aliases" : [ "CVE-2020-7610" ],
"summary" : "Deserialization of Untrusted Data in bson",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "bson"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-7610"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/js-bson/commit/3809c1313a7b2a8001065f0271199df9fa3d16a8"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-BSON-561052"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-06T23:40:10Z",
"nvd_published_at" : "2020-03-30T19:15:00Z"
}
}