CVE-2026-46681
@nevware21/ts-utils: Prototype Pollution in objDeepCopy/objCopyProps via for...in without hasOwnProperty
描述
## Summary The _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. ## Details In _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. ## PoC ``` const malicious = JSON.parse('{"__proto__": {"polluted": true}}'); objDeepCopy(malicious); console.log({}.polluted); // true ``` ## Suggested Fix Add objHasOwnProperty check and filter __proto__, constructor, prototype keys.
如何修補 CVE-2026-46681
要修補 CVE-2026-46681,請將受影響套件升級到下列已修補版本。
- —升級至 0.14.0 或更新版本
CVE-2026-46681 正在被利用嗎?
目前沒有被利用訊號。CVE-2026-46681 既不在 CISA KEV 也沒有最新的 EPSS 分數。
受影響套件(1)
- from 0, < 0.14.0
CVSS 分數
| 來源 | 版本 | 嚴重程度 | 向量 |
|---|---|---|---|
| osv | CVSS 4.0 | — | 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 |