Vulnerabilities in pkg:npm/kind-of

PACKAGE
Advisory Identifier: GHSA-6c8f-qphg-qjgp
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/kind-of

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/kind-of. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-6c8f-qphg-qjgp CVE-2019-20149 HIGH Validation Bypass in kind-of

CVE-2019-20149 at a Glance

CVE Identifier CVE-2019-20149
GHSA Identifier GHSA-6c8f-qphg-qjgp
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product Kind of
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (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.

kind-of fixed: 6.0.3
npm install kind-of@6.0.3
Verify Direct and Transitive Dependencies

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

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. ## Recommendation Upgrade to versions 6.0.3 or later.

CVE-2019-20149 Affected Kind of Versions

1 component(s)
Fixed Versions:
6.0.3
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?
CVE-2019-20149 is a security vulnerability in Kind of involving Validation Bypass in kind-of under CWE-668: Exposure of Resource to Wrong Sphere.
Which Kind of versions are affected?
Affected versions include releases prior to 6.0.3 across affected packages: kind-of.
What version fixes CVE-2019-20149?
Upgrading to 6.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is kind-of affected?
Yes, kind-of is affected in releases prior to 6.0.3. Upgrade your dependency to 6.0.3 or later.
What is the CVSS score of CVE-2019-20149?
CVE-2019-20149 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2019-20149?
CVE-2019-20149 is classified under CWE-668: Exposure of Resource to Wrong Sphere (The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.).
How can I check npm dependencies for CVE-2019-20149?
Run the dependency tree command: 'npm ls kind-of'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}