{"id":"GHSA-x7j8-49r8-mr43","summary":"@nevware21/ts-utils: Prototype Pollution in objDeepCopy/objCopyProps via for...in without hasOwnProperty","details":"## Summary\n\nThe _copyProps function in lib/src/object/copy.ts uses for...in to iterate over source object properties without an Object.hasOwnProperty check, and does not filter dangerous keys (__proto__, constructor, prototype). This allows an attacker to pollute the prototype chain of all objects in the application.\n\n## Details\n\nIn _copyProps() (copy.ts lines 186-191), the code iterates all enumerable properties including inherited ones and dangerous keys like __proto__. Any object with a __proto__ key (e.g., from untrusted JSON input) will overwrite the target's prototype.\n\n## PoC\n```\nconst malicious = JSON.parse('{\"__proto__\": {\"polluted\": true}}');\nobjDeepCopy(malicious);\nconsole.log({}.polluted); // true\n```\n## Suggested Fix\n\nAdd objHasOwnProperty check and filter __proto__, constructor, prototype keys.","aliases":["CVE-2026-46681"],"modified":"2026-09-10T03:51:07.205441100Z","published":"2026-05-21T21:41:36Z","database_specific":{"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2026-05-21T21:41:36Z","nvd_published_at":null,"cwe_ids":["CWE-1321"]},"references":[{"type":"WEB","url":"https://github.com/nevware21/ts-utils/security/advisories/GHSA-x7j8-49r8-mr43"},{"type":"PACKAGE","url":"https://github.com/nevware21/ts-utils"}],"affected":[{"package":{"name":"@nevware21/ts-utils","ecosystem":"npm","purl":"pkg:npm/%40nevware21/ts-utils"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.14.0"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 0.13.0","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-x7j8-49r8-mr43/GHSA-x7j8-49r8-mr43.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U"}]}