{"id":"CVE-2026-46681","aliases":["GHSA-x7j8-49r8-mr43"],"url":"https://o3.security/vulnerability/CVE-2026-46681","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.","published":"2026-07-21T14:02:03.732Z","modified":"2026-08-12T03:51:17.762051562Z","cvss":null,"epss":{"score":0.00284,"percentile":0.20893,"asOf":"2026-08-18"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"@nevware21/ts-utils","fixedVersion":"0.14.0"}],"fix":{"url":"https://github.com/nevware21/ts-utils/commit/5e887f4e2fbee7160c8f501634c45e6a229e83bb","label":"nevware21/ts-utils@5e887f4"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46681.json"},{"type":"ADVISORY","url":"https://github.com/nevware21/ts-utils/security/advisories/GHSA-x7j8-49r8-mr43"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46681"},{"type":"FIX","url":"https://github.com/nevware21/ts-utils/commit/5e887f4e2fbee7160c8f501634c45e6a229e83bb"},{"type":"PACKAGE","url":"https://github.com/nevware21/ts-utils"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:17.762051562Z"}}