Highcharts Grid Pro: cell-renderer `attributes` map written with raw `setAttribute`GHSA-5ghw-9mgr-jvx2
Fix: highcharts/highcharts@52abd4fGHSA-5ghw-9mgr-jvx2 is a Cross-site Scripting (XSS) vulnerability in @highcharts/grid-pro. A fix is available for @highcharts/grid-pro — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-5ghw-9mgr-jvx2.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@highcharts/grid-pronpm@highcharts/dashboardsnpmDescription
Impact
The input-type cell renderers copy every entry of the renderer's attributes option onto the input or select element they create, without checking the attribute names. An attacker who controls the Grid configuration can supply entries under a column's cells.renderer.attributes or cells.editMode.renderer.attributes whose names are event handlers, and those handlers execute in the origin of the page hosting the Grid. A view renderer places the handler on the input rendered in every row of the column as soon as the Grid renders; an edit-mode renderer places it on the input created when a cell enters edit mode, and that input is focused immediately, so a focus handler runs as soon as the user starts editing. Exploitation requires that untrusted data reach the Grid configuration and that a user hover over or focus one of the rendered inputs, or begin editing a cell. The Pro DataGrid that shipped inside the Dashboards package is included.
Workarounds
If your column configuration comes from a source you do not fully control, paste this snippet right after importing the Grid module:
const ALLOWED_RENDERER_ATTRIBUTES = [
'autofocus', 'checked', 'max', 'maxlength', 'min', 'minlength',
'multiple', 'pattern', 'placeholder', 'size', 'step'
];
const scrubColumn = (column) => {
const cells = column?.cells;
for (const renderer of [cells?.renderer, cells?.editMode?.renderer]) {
const attributes = renderer?.attributes;
if (attributes) {
for (const key of Object.keys(attributes)) {
if (!ALLOWED_RENDERER_ATTRIBUTES.includes(key.toLowerCase())) {
delete attributes[key];
}
}
}
}
return column;
};
const scrubOptions = (options) => {
scrubColumn(options?.columnDefaults);
(options?.columns || []).forEach(scrubColumn);
return options;
};
const proto = Grid.Grid.prototype;
const loadUserOptions = proto.loadUserOptions;
proto.loadUserOptions = function (options, ...rest) {
scrubOptions(Grid.defaultOptions);
return loadUserOptions.call(this, scrubOptions(options), ...rest);
};
const updateColumn = proto.updateColumn;
proto.updateColumn = function (columnId, options, ...rest) {
return updateColumn.call(this, columnId, scrubColumn(options), ...rest);
};
Obtaining the patched version
The patched releases are available from all the usual distribution channels. With npm, upgrade the affected package to the patched version listed above, for example npm install @highcharts/[email protected]. If you load Highcharts Grid from a CDN, use a versioned URL, for example https://cdn.jsdelivr.net/npm/@highcharts/[email protected]/grid-lite.js. For more on each installation method, see the installation guide.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @highcharts/grid-pro | ≥ 2.0.0&&< 3.2.0 | 3.2.0npm install @highcharts/grid-pro@3.2.0 |
| 📦npm | @highcharts/dashboards | ≥ 3.6.0&&< 4.0.0 | 4.0.0npm install @highcharts/dashboards@4.0.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @highcharts/grid-pro, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @highcharts/grid-pro to 3.2.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5ghw-9mgr-jvx2 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat rates this vulnerability as having a Moderate severity impact because exploitation requires the ability to provide untrusted column configurations and depends on user interaction to execute arbitrary JavaScript in the victim's browser. The issue is restricted to the client-side web presentation layer,…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for GHSA-5ghw-9mgr-jvx2 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-5ghw-9mgr-jvx2 in your dependencies?
Find it across npm, including transitive dependencies.