{"id":"GHSA-x7j8-49r8-mr43","revision":"ad91bedbf2854465b72fa3efdb5fa77a","records":[{"revision":"ad91bedbf2854465b72fa3efdb5fa77a","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-x7j8-49r8-mr43","aliases":["CVE-2026-46681"],"title":"@nevware21/ts-utils: Prototype Pollution in objDeepCopy/objCopyProps via for...in without hasOwnProperty","description":"## 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.","state":0,"publishedAt":"2026-05-21T21:41:36+00:00","modifiedAt":"2026-09-10T03:51:07.2054411+00:00","affected":[{"ecosystem":"npm","name":"@nevware21/ts-utils","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.14.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/nevware21/ts-utils/security/advisories/GHSA-x7j8-49r8-mr43","https://github.com/nevware21/ts-utils"],"sourceUrl":"https://github.com/advisories/GHSA-x7j8-49r8-mr43","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-x7j8-49r8-mr43","identifiers":["GHSA-x7j8-49r8-mr43","CVE-2026-46681"]},"retained":false,"historicalAffected":[]}],"coverage":[]}