CVE-2019-20149: Kind of Validation Bypass Vulnerability
HIGHCVE-2019-20149 is a HIGH (CVSS 7.5) validation bypass vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Kind of libraries in the npm ecosystem. The issue involves validation bypass in kind-of. Remediation is available by upgrading affected packages to version 6.0.3.
CVE-2019-20149 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2019-20149
To remediate this vulnerability, upgrade all affected Kind of dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install kind-of@6.0.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls kind-of
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2019-20149, inspect your project dependencies using npm:
npm ls kind-of
Analyze the terminal output to locate any version of Kind of in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.0.3), your application is affected.
Note: The npm ls kind-of command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Kind of, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2019-20149 Affected Kind of Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
kind-of
|
npm |
≥ 6.0.0
< 6.0.3
|
6.0.3
|
References
Frequently Asked Questions
What is CVE-2019-20149?
Which Kind of versions are affected?
What version fixes CVE-2019-20149?
Is kind-of affected?
What is the CVSS score of CVE-2019-20149?
What CWE is associated with CVE-2019-20149?
How can I check npm dependencies for CVE-2019-20149?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6c8f-qphg-qjgp",
"modified" : "2021-08-23T15:03:55Z",
"published" : "2020-03-31T15:59:54Z",
"aliases" : [ "CVE-2019-20149" ],
"summary" : "Validation Bypass in kind-of",
"details" : "Versions of `kind-of` 6.x prior to 6.0.3 are vulnerable to a Validation Bypass. A maliciously crafted object can alter the result of the type check, allowing attackers to bypass the type checking validation. \n\n\n## Recommendation\n\nUpgrade to versions 6.0.3 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "kind-of"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.0.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-20149"
}, {
"type" : "WEB",
"url" : "https://github.com/jonschlinkert/kind-of/issues/30"
}, {
"type" : "WEB",
"url" : "https://github.com/jonschlinkert/kind-of/pull/31"
}, {
"type" : "WEB",
"url" : "https://github.com/jonschlinkert/kind-of/commit/1df992ce6d5a1292048e5fe9c52c5382f941ee0b"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-KINDOF-537849"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1490"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-668" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-03-31T15:59:30Z",
"nvd_published_at" : null
}
}