ag-grid-community@22.1.1 vulnerabilities

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue

Direct Vulnerabilities

Known vulnerabilities in the ag-grid-community 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)

ag-grid-community is a fully-featured and highly customizable JavaScript data grid.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS). By using cellRenderer with a simple function and valueFormatter together, you are able to target the loadTemplate function, which executes the script since it is using the innerHTML property.

This is only the case when you are returning a string, number, or boolean.

PoC

// An example application: https://embed.plnkr.co/plunk/fbtYhl
// Replace ColumnDefinition with below
                  headerName: "Ag grid Testing Header 1 With Long text",
                  field: "value",
                   headerComponent: "CustomHeader",
                   valueFormatter: () => `><img src=x onerror=prompt(document.domain)>`
              },

How to fix Cross-site Scripting (XSS)?

Upgrade ag-grid-community to version 25.2.0 or higher.

<25.2.0