CVSS 8.4 HIGH

Highcharts Grid: `javascript:` URL in credits.href runs script on click

Mã khác
GHSA-6hgp-fmhr-mrg4
Công bố
Cập nhật
Lần đầu thấy
Nguồn
GitHub Advisory, NVD, CVE.org, OSV.dev

Mô tả

Impact

An attacker who controls the Grid configuration can set credits.href to a javascript: URL. The value is not validated against an allowed-scheme list before it is applied to the credits link, so activating that link runs attacker-supplied script in the origin of the page hosting the Grid. Exploitation requires that untrusted data reach the Grid configuration and that a user activate the credits link. Script running this way has the same access to page data, storage and session state as the hosting application.

Workarounds

Paste in after the Grid Pro module is imported, before a Grid is created.

const { AST } = Grid;

function sanitize(options) {
    const credits = options && options.credits;

    if (credits && typeof credits.href === 'string') {
        const filtered = AST.filterUserAttributes({ href: credits.href });

        if (!filtered.href) {
            delete credits.href;
        }
    }

    return options;
}

// Both Grid.grid() and grid.update() funnel through loadUserOptions, so one
// hook covers both entry points.
const { prototype } = Grid.Grid;
const loadUserOptions = prototype.loadUserOptions;

prototype.loadUserOptions = function (options, ...rest) {
    sanitize(options);
    return loadUserOptions.call(this, 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/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.

Điểm và phân loại

CVSS
8.4 HIGH v4.0
Nguồn điểm
NVD
Mức độ (theo nguồn)
HIGH
EPSS
0.35%
CWE
CWE-79

Vector CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Ảnh hưởng

Package Bản bị ảnh hưởng Bản đã sửa
npm @highcharts/dashboards >= 3.2.0, <= 3.6.0 4.0.0
npm @highcharts/grid-pro >= 2.0.0, <= 3.1.0 3.2.0
npm @highcharts/dashboards >= 3.2.0, < 4.0.0 4.0.0
npm @highcharts/grid-pro >= 2.0.0, < 3.2.0 3.2.0

Sản phẩm

  • highcharts highcharts
  • @highcharts dashboards
  • @highcharts grid-pro

Vì sao được giữ

  • CVSS 8.4 >= 8.0

Loại tác động

Không nhận ra loại tác động nào từ CWE, vector hay mô tả.

Dữ liệu riêng của nguồn

CVE.org · Đơn vị cấp mã
GitHub_M
OSV.dev · ID
GHSA-6hgp-fmhr-mrg4

Tham khảo