{"id":"CVE-2026-26021","aliases":["CVE-2026-26021","GHSA-2c4m-g7rx-63q7"],"related":[],"kind":"vulnerability","state":"published","title":"Prototype pollution in set-in","summary":"set-in provides the set value of nested associative structure given array of keys. A prototype pollution vulnerability exists in the the npm package set-in (>=2.0.1, < 2.0.5). Despite a previous fix that attempted to mitigate prototype pollution by checking whether user input contained a forbidden key, it is still possible to pollute Object.prototype via a crafted input using Array.prototype. This has been fixed in version 2.0.5.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"set-in provides the set value of nested associative structure given array of keys. A prototype pollution vulnerability exists in the the npm package set-in (>=2.0.1, < 2.0.5). Despite a previous fix that attempted to mitigate prototype pollution by checking whether user input contained a forbidden key, it is still possible to pollute Object.prototype via a crafted input using Array.prototype. This has been fixed in version 2.0.5.","source":"cvelist"},{"lang":"en","text":"### Summary\nA prototype pollution vulnerability exists in the the npm package set-in (>=2.0.1). Despite a previous fix that attempted to mitigate prototype pollution by checking whether user input contained a forbidden key, it is still possible to pollute Object.prototype via a crafted input using Array.prototype. This has been fixed in version 2.0.5.\n\n### Details\nThe vulnerability resides in line 28 of https://github.com/ahdinosaur/set-in/blob/master/index.js where includes() function is used to check whether user provided input contain forbidden strings.\n\n### PoC\n#### Steps to reproduce\n1. Install latest version of set-in using npm install or cloning from git\n2. Run the following code snippet:\n\n```javascript\nArray.prototype.includes = () => false; \nconst si = require('set-in');\nconst obj = {};\nconsole.log({}.polluted);\nsi(obj, [\n    'constructor',\n    'prototype',\n    'polluted'\n], 'yes');\nconsole.log('{ ' + obj.polluted + ', ' + 'yes' + ' }');  // prints yes -> indicating that the patch was bypassed and prototype pollution occurred\n```\n\n#### Expected behavior\nPrototype pollution should be prevented and {} should not gain new properties.\nThis should be printed on the console:\n```\nundefined\nundefined OR throw an Error\n```\n\n#### Actual behavior\nObject.prototype is polluted\nThis is printed on the console:\n```\nundefined \nyes\n```\n\n### Impact\nThis is a prototype pollution vulnerability, which can have severe security implications depending on how set-in is used by downstream applications. Any application that processes attacker-controlled input using this package may be affected.\nIt could potentially lead to the following problems:\n1. Authentication bypass\n2. Denial of service\n3. Remote code execution (if polluted property is passed to sinks like eval or child_process)","format":"markdown","source":"ghsa"},{"lang":"es","text":"set-in proporciona el valor establecido de una estructura asociativa anidada dado un array de claves. Una vulnerabilidad de contaminación de prototipos existe en el paquete npm set-in (&gt;=2.0.1, &lt; 2.0.5). A pesar de una corrección anterior que intentó mitigar la contaminación de prototipos al verificar si la entrada del usuario contenía una clave prohibida, todavía es posible contaminar Object.prototype a través de una entrada manipulada usando Array.prototype. Esto ha sido corregido en la versión 2.0.5.","source":"nvd"}],"published":"2026-02-11T15:13:28.000Z","modified":"2026-06-17T10:25:36.833Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":9.4,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":9.4,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-1321"],"affected":[{"ranges":[{"version":">= 2.0.1, < 2.0.5","status":"affected"}],"vendor":"ahdinosaur","product":"set-in","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.1","status":"affected","fixed":"2.0.5"}],"ecosystem":"npm","package":"set-in","purl":"pkg:npm/set-in","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.0.1","fixed":"2.0.5"}],"vendor":"set-in_project","product":"set-in","cpe":"cpe:2.3:a:set-in_project:set-in:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/ahdinosaur/set-in/security/advisories/GHSA-2c4m-g7rx-63q7","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ahdinosaur/set-in/commit/b8e1dabfdbd35c8d604b6324e01d03f280256c3d","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-26021","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ahdinosaur/set-in/pull/6","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ahdinosaur/set-in/commit/34842cc02de3fd65d6f8bd0b268347e7b390125b","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ahdinosaur/set-in/commit/6bad255961d379e4b1f5fbc52ef9dc8420816f24","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ahdinosaur/set-in/commit/d87c1a09fa2edb55cd76440a67d83d1cb828df11","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ahdinosaur/set-in","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-02-12T21:15:49.981Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-26021","url":"https://www.cve.org/CVERecord?id=CVE-2026-26021","licence":"CVE Terms of Use","modified":"2026-02-12T21:16:04.618Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2c4m-g7rx-63q7","url":"https://github.com/advisories/GHSA-2c4m-g7rx-63q7","licence":"CC-BY-4.0","modified":"2026-02-22T23:20:49.933Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-26021","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-26021","licence":"Public domain","modified":"2026-06-17T10:25:36.833Z"}],"updatedAt":"2026-11-25T22:59:13.787Z","epss":{"score":0.00557,"percentile":0.47788,"date":"2026-12-01T12:00:22.000Z"}}