CVE-2017-1001004: Arbitrary JavaScript Execution in typed-function

typed-function Updated 02 Oct 2025

Summary

02/09/2020
Yes i
High
Not published

CVE-2017-1001004: Arbitrary JavaScript Execution in typed-function. Affects typed-function versions < 0.10.6. Fixed in 0.10.6. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 →

Share this vulnerability

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.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback