Vulnerabilities in pkg:npm/bootstrap-table

PACKAGE
Advisory Identifier: GHSA-mw6q-98mp-g8g8
Advisory Summary

CVE-2021-23472 is a LOW (CVSS 3.1) cross-site scripting vulnerability (CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')) affecting Bootstrap table libraries in the npm ecosystem. The issue involves cross-site scripting in bootstrap-table. Remediation is available in the latest vendor maintenance releases.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/bootstrap-table

2 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-mw6q-98mp-g8g8 CVE-2021-23472 LOW Cross-site Scripting in bootstrap-table
GHSA-grw5-g9h2-wpg8 CVE-2022-1726 MODERATE Cross-site Scripting in bootstrap-table

CVE-2021-23472 at a Glance

CVE Identifier CVE-2021-23472
GHSA Identifier GHSA-mw6q-98mp-g8g8
Severity LOW
CVSS v3.1 Base Score 3.1
CWE Classification CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')
Affected Product Bootstrap table
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 3.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2021-23472

To remediate this vulnerability, upgrade all affected Bootstrap table dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

bootstrap-table fixed: Latest secure release
npm install bootstrap-table@Latest secure release
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 bootstrap-table

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2021-23472, inspect your project dependencies using npm:

npm ls bootstrap-table

Analyze the terminal output to locate any version of Bootstrap table in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The npm ls bootstrap-table 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-843: Access of Resource Using Incompatible Type ('Type Confusion'), where the product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type. In Bootstrap table, 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

This affects all versions of package bootstrap-table. A type confusion vulnerability can lead to a bypass of input sanitization when the input provided to the escapeHTML function is an array (instead of a string) even if the escape attribute is set.

CVE-2021-23472 Affected Bootstrap table Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
bootstrap-table
npm
≤ 1.19.0

References

Frequently Asked Questions

What is CVE-2021-23472?
CVE-2021-23472 is a security vulnerability in Bootstrap table involving Cross-site Scripting in bootstrap-table under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion').
Which Bootstrap table versions are affected?
Affected versions include releases prior to current release patches across affected packages: bootstrap-table.
What version fixes CVE-2021-23472?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is bootstrap-table affected?
Yes, bootstrap-table is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2021-23472?
CVE-2021-23472 has a CVSS v3.1 base score of 3.1 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2021-23472?
CVE-2021-23472 is classified under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion') (The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.).
How can I check npm dependencies for CVE-2021-23472?
Run the dependency tree command: 'npm ls bootstrap-table'. 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-mw6q-98mp-g8g8",
  "modified" : "2023-01-23T18:49:17Z",
  "published" : "2021-11-08T17:54:46Z",
  "aliases" : [ "CVE-2021-23472" ],
  "summary" : "Cross-site Scripting in bootstrap-table",
  "details" : "This affects all versions of package bootstrap-table. A type confusion vulnerability can lead to a bypass of input sanitization when the input provided to the escapeHTML function is an array (instead of a string) even if the escape attribute is set.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "bootstrap-table"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.19.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23472"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wenzhixin/bootstrap-table"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wenzhixin/bootstrap-table/blob/develop/src/utils/index.js%23L218"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-JS-BOOTSTRAPTABLE-1657597"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARS-1910690"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1910689"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBWENZHIXIN-1910687"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1910688"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-BOOTSTRAPTABLE-1657597"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79", "CWE-843" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-11-04T17:00:48Z",
    "nvd_published_at" : "2021-11-03T18:15:00Z"
  }
}