---
id: "CVE-2026-118254"
kind: "vulnerability"
aliases: ["CVE-2026-118254", "GHSA-r5wg-q8fc-p6w2"]
title: "Highcharts Grid parses pagination language options as HTML"
severity: "high"
cvss: 8.6
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "@highcharts/grid-lite", "fixed": ["3.2.0"], "affected": ">= 2.0.0, <= 3.1.0", "ecosystem": "npm"}, {"name": "@highcharts/grid-pro", "fixed": ["3.2.0"], "affected": ">= 2.0.0, <= 3.1.0", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["cwe-79", "frontend", "highcharts", "javascript", "package", "web"]
not_affected_if: ["no-grid", "pagination-disabled", "static-language-config"]
published_at: "2026-10-28T19:17:29+00:00"
first_seen_at: "2026-10-28T19:34:54+00:00"
updated_at: "2026-10-28T20:01:43+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-118254", "first_seen_at": "2026-10-28T19:34:54+00:00"}, {"source": "ghsa", "url": "https://github.com/advisories/GHSA-r5wg-q8fc-p6w2", "first_seen_at": "2026-10-28T20:01:43+00:00"}]
---

# Highcharts Grid parses pagination language options as HTML

Highcharts Grid from 2.0.0 up to 3.2.0 writes pagination language strings into the DOM as markup rather than text. If an attacker controls the Grid language configuration, injected elements with event handlers run in the hosting page's origin when pagination renders.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:@highcharts/grid-lite affected >= 2.0.0, <= 3.1.0 fixed 3.2.0
- npm:@highcharts/grid-pro affected >= 2.0.0, <= 3.1.0 fixed 3.2.0

## How to check

- Check the installed Highcharts version with `npm ls highcharts` or by reading the `version` field in `node_modules/highcharts/package.json`.
- Look for Grid use with pagination enabled and a language option built from user-controlled or external data.

## Fix

- Upgrade Highcharts to `3.2.0` or later.
- Until upgraded, do not pass untrusted content into the Grid language configuration.

## Timeline

- 2026-10-28T19:34:54+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-118254
- 2026-10-28T20:01:43+00:00 ghsa https://github.com/advisories/GHSA-r5wg-q8fc-p6w2

## From the sources

### Impact
The pagination language strings are written into the DOM as markup rather than as text. An attacker who controls those language options can supply elements carrying event handlers, and those handlers execute in the origin of the page hosting the Grid when the pagination controls render. Exploitation requires that untrusted data reach the Grid language configuration and that pagination be enabled on the Grid.

### Workarounds
Run this once after loading the Grid, before creating any grid:
```javascript
{
    const Pagination = Grid.Pagination;

    const escapeLang = (pagination) => {
        const lang = pagination.lang;
        if (!lang) {
            return;
        }

        for (const key of ['pageInfo', 'pageSizeLabel']) {
            if (typeof lang[key] === 'string') {
                lang[key] = lang[key].replace(/</g, '&lt;');
            }
        }
    };

    for (const name of ['updatePageInfo', 'renderPageSizeSelector']) {
        const original = Pagination.prototype[name];

        Pagination.prototype[name] = function (...args) {
            escapeLang(this);
            return original.apply(this, args);
        };
    }
}
```

### 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/grid-lite@3.2.0`. If you load Highcharts Grid from a CDN, use a versioned URL, for example `https://cdn.jsdelivr.net/npm/@highcharts/grid-lite@3.2.0/grid-lite.js`. For more on each installation method, see the [installation guide](https://www.highcharts.com/docs/grid/installation).

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
