CVE-2021-23472: Bootstrap table Cross-Site Scripting Vulnerability
LOWCVE-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.
CVE-2021-23472 at a Glance
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).
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.
npm install bootstrap-table@Latest secure release
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
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?
Which Bootstrap table versions are affected?
What version fixes CVE-2021-23472?
Is bootstrap-table affected?
What is the CVSS score of CVE-2021-23472?
What CWE is associated with CVE-2021-23472?
How can I check npm dependencies for CVE-2021-23472?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}