Description
This affects the package json8 before 1.0.3. The function adds in the target object the property specified in the path, however it does not properly check the key being set, leading to a prototype pollution.
Remediation
References
https://github.com/sonnyp/JSON8/commit/2e890261b66cbc54ae01d0c79c71b0fd18379e7e
https://snyk.io/vuln/SNYK-JS-JSON8-1017116
Related Vulnerabilities
CVE-2021-43812 Vulnerability in npm package @auth0/nextjs-auth0
CVE-2021-24122 Vulnerability in maven package org.apache.tomcat.embed:tomcat-embed-core
CVE-2020-7793 Vulnerability in maven package org.webjars.bowergithub.faisalman:ua-parser-js
CVE-2021-28161 Vulnerability in npm package @wiptheia/core
CVE-2023-2138 Vulnerability in npm package @nuxtlabs/github-module