VYPR
Moderate severityNVD Advisory· Published Jun 24, 2021· Updated Sep 17, 2024

Cross-site Scripting (XSS)

CVE-2021-23398

Description

All versions of package react-bootstrap-table are vulnerable to Cross-site Scripting (XSS) via the dataFormat parameter. The problem is triggered when an invalid React element is returned, leading to dangerouslySetInnerHTML being used, which does not sanitize the output.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

All versions of react-bootstrap-table are vulnerable to stored XSS via the dataFormat parameter when an invalid React element triggers dangerouslySetInnerHTML without sanitization.

Vulnerability

All versions of the react-bootstrap-table package are vulnerable to Cross-site Scripting (XSS) via the dataFormat parameter [1][2][3]. The issue occurs when a dataFormat function returns an invalid React element (e.g., a plain string instead of a React component). This causes the library to use dangerouslySetInnerHTML to render the output, which does not sanitize the input, allowing arbitrary HTML/JavaScript injection [4].

Exploitation

An attacker can exploit this by providing a malicious payload as a value in the data array passed to BootstrapTable. The payload must be crafted to bypass the dataFormat function's expected return type. For example, a string containing an XSS vector like ` can be used. When the table renders, the dataFormat function returns the string, which is then injected via dangerouslySetInnerHTML` without sanitization [2][3]. No authentication or special network position is required; the attacker only needs to supply the malicious data to the table component.

Impact

Successful exploitation leads to stored Cross-site Scripting (XSS) in the context of the user's browser. An attacker can execute arbitrary JavaScript, steal cookies, session tokens, or perform actions on behalf of the victim. The impact is limited to the client-side, but can compromise user data and application integrity.

Mitigation

As of the publication date (June 24, 2021), there is no fixed version for react-bootstrap-table [2][3]. The package appears to be unmaintained. Users should avoid using the dataFormat parameter with untrusted data, or sanitize the output manually before returning from dataFormat. Alternatively, consider migrating to a maintained fork or alternative library. The vulnerability is not listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
react-bootstrap-tablenpm
<= 4.3.1

Affected products

3

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

6

News mentions

0

No linked articles in our index yet.