CVE-2017-1001004: Arbitrary JavaScript Execution in typed-function
Summary
CVE-2017-1001004: Arbitrary JavaScript Execution in typed-function. Affects typed-function versions < 0.10.6. Fixed in 0.10.6. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The typed-function package is an npm package that provides a way to create typed functions in JavaScript. It allows developers to define the types of arguments and return values for functions, ensuring type safety. However, versions prior to 0.10.6 are vulnerable to Arbitrary JavaScript Execution. This vulnerability arises from improper sanitization of function names, which can be exploited by an attacker to execute arbitrary code.
Vulnerability Detail
The vulnerability in typed-function allows an attacker to execute arbitrary JavaScript code. By manipulating function names, an attacker can inject malicious code that will be executed when the function is called. This can lead to various security issues, such as unauthorized access, data theft, or remote code execution. The vulnerability has a severity rating of HIGH according to the Common Weakness Enumeration (CWE) classification (CWE-94).
How To Fix
Latest published version: 4.2.2 as of 22 Oct 2026
npm install typed-function@4.2.2
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.10.6
This is the first release that contains the fix.
npm install typed-function@0.10.6
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The typed-function package prior to version 0.10.6 is vulnerable to Arbitrary JavaScript Execution. It is crucial to upgrade to the fixed version to mitigate the risk of unauthorized code execution. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for typed-function →
FAQ
The vulnerability allows an attacker to execute arbitrary JavaScript code, which can lead to unauthorized access, data theft, or remote code execution.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and Vulert will analyze it in real-time.
There are no known workarounds for this vulnerability. It is recommended to upgrade to the fixed version of the typed-function package.
There is no evidence of this vulnerability being exploited in the wild at the moment. However, it is important to patch your application to prevent any potential attacks.
This vulnerability was discovered and reported by the GitHub Security Lab.