Vulnerabilities in pkg:npm/json8-merge-patch
PACKAGECVE-2020-8268 is a HIGH (CVSS 7.5) prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Json8 merge patch libraries in the npm ecosystem. The issue involves prototype pollution in json8-merge-patch. Remediation is available by upgrading affected packages to version 1.0.3.
pkg:npm/json8-merge-patch
Vulnerability advisories affecting package pkg:npm/json8-merge-patch. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-8v9x-9xqg-r8mr | CVE-2020-8268 | HIGH | Prototype pollution in json8-merge-patch |
CVE-2020-8268 at a Glance
Security Impact
CVSS: 7.5
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:N/I:H/A:N).
How to Fix CVE-2020-8268
To remediate this vulnerability, upgrade all affected Json8 merge patch 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 json8-merge-patch@1.0.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls json8-merge-patch
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-8268, inspect your project dependencies using npm:
npm ls json8-merge-patch
Analyze the terminal output to locate any version of Json8 merge patch in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.3), your application is affected.
Note: The npm ls json8-merge-patch 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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Json8 merge patch, 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-8268 Affected Json8 merge patch Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
json8-merge-patch
|
npm |
< 1.0.3
|
1.0.3
|
References
Frequently Asked Questions
What is CVE-2020-8268?
Which Json8 merge patch versions are affected?
What version fixes CVE-2020-8268?
Is json8-merge-patch affected?
What is the CVSS score of CVE-2020-8268?
What CWE is associated with CVE-2020-8268?
How can I check npm dependencies for CVE-2020-8268?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8v9x-9xqg-r8mr",
"modified" : "2021-04-19T22:31:31Z",
"published" : "2021-05-10T19:17:15Z",
"aliases" : [ "CVE-2020-8268" ],
"summary" : "Prototype pollution in json8-merge-patch",
"details" : "Prototype pollution vulnerability in json8-merge-patch npm package < 1.0.3 may allow attackers to inject or modify methods and properties of the global object constructor.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "json8-merge-patch"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-8268"
}, {
"type" : "WEB",
"url" : "https://github.com/sonnyp/JSON8/issues/113"
}, {
"type" : "WEB",
"url" : "https://github.com/sonnyp/JSON8/commit/2e890261b66cbc54ae01d0c79c71b0fd18379e7e#diff-faa7bef039022bc7ca1c613331b2373950ddd3d65ebf25d1699fbdf89773a387"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/980649"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/json8-merge-patch"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321", "CWE-20", "CWE-471" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-04-19T22:31:31Z",
"nvd_published_at" : "2020-11-09T15:15:00Z"
}
}