CVE-2026-46681
JSON

7.2high

@nevware21/ts-utils: Prototype Pollution in objDeepCopy/objCopyProps via for...in without hasOwnProperty

Severity
7.2high CVSS:4.0 by GitHub_M
Exploit likelihood
0.36% (higher than 31% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-x7j8-49r8-mr43

Description

@nevware21/ts-utils is a comprehensive TypeScript/JavaScript utility library. Prior to version 0.14.0, 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. Version 0.14.0 patches the issue.

Affected

Product or packageVersionsReported by
nevware21 ts-utils< 0.14.0CVE List
@nevware21/ts-utils (npm)before 0.14.0GitHub Advisory Database

All scores

GitHub_M7.2high CVSS:4.0CVSS: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
GitHubhigh CVSS:4.0CVSS: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

Classification

CWE-1321

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.

What each source says

CVE List

@nevware21/ts-utils is a comprehensive TypeScript/JavaScript utility library. Prior to version 0.14.0, 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. Version 0.14.0 patches the issue.

GitHub Advisory Database

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.

NVD (es)

@nevware21/ts-utils es una completa biblioteca de utilidades de TypeScript/JavaScript. Antes de la versión 0.14.0, la función _copyProps en lib/src/object/copy.ts utiliza for...in para iterar sobre las propiedades del objeto de origen sin una comprobación de Object.hasOwnProperty, y no filtra claves peligrosas (__proto__, constructor, prototype). Esto permite a un atacante contaminar la cadena de prototipos de todos los objetos en la aplicación. La versión 0.14.0 soluciona el problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-46681 changed 2026-07-21CVE Terms of Use
GitHub Advisory DatabaseGHSA-x7j8-49r8-mr43 changed 2026-09-10CC-BY-4.0
NVDCVE-2026-46681 changed 2026-10-24Public domain