Critical Vulnerability in node-kind-of: Constructor Name Manipulation

node-kind-of Updated 02 Oct 2025

Summary

30/12/2019
N/A
Yes i
High
7.5

CVE-2019-20149: ctorName in index.js in kind-of v6.0.2 allows external user input to overwrite certain internal attributes via a conflicting name, as demonstrated by 'constructor': {'name':'Symbol'}. Affects node-kind-of across 2 version ranges.

< 0b4ababf3a8505f60055487415a2dfe678a10b53 < 6.0.3+dfsg-1

Fixed in 6.0.3+dfsg-1. 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The node-kind-of package is a utility for determining the type of a given value in JavaScript. It is widely used in various applications to provide type detection functionality. However, in version 6.0.2, a vulnerability was discovered that allows external user input to overwrite internal attributes, specifically the constructor name, which can lead to incorrect type detection results.

Vulnerability Detail

The vulnerability, identified as CVE-2019-20149, arises from the ctorName function in index.js of the node-kind-of package version 6.0.2. It allows an attacker to manipulate the constructor name through crafted payloads, such as using 'constructor': {'name':'Symbol'}. This manipulation can lead to significant security risks, including the potential for type confusion and exploitation of the application relying on this package for type detection. The vulnerability affects multiple Debian ecosystems and can be exploited without authentication.

How To Fix

Minimum fixed version

6.0.3+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-kind-of

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If an immediate update is not feasible, consider implementing input validation to sanitize user inputs that may interact with the node-kind-of package. This can help mitigate the risk of exploitation until the package is updated.

Conclusion

The CVE-2019-20149 vulnerability in the node-kind-of package poses significant risks due to its ability to manipulate internal attributes through crafted payloads. It is crucial for users of this package to update to the latest version to ensure their applications remain secure. Additionally, utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for node-kind-of →

Share this vulnerability

FAQ

CVE-2019-20149 is a vulnerability in the node-kind-of package that allows external manipulation of internal attributes, leading to incorrect type detection.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Versions of node-kind-of prior to 6.0.3+dfsg-1 are affected by this vulnerability.

The vulnerability can lead to type confusion, which may allow attackers to exploit applications that rely on accurate type detection, potentially leading to further security breaches.

Yes, implementing input validation to sanitize user inputs can help mitigate the risk until an update is applied.

Related vulnerabilities

Recent vulnerabilities recorded for node-kind-of.

How To Fix

Minimum fixed version

6.0.3+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-kind-of

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