Highchartsに prototype 汚染の脆弱性、ページ全体の動作に影響のおそれ
Summary
Highcharts JSの13.0.0から13.1.0までに、グラフのデータ列を作る処理で、Object.prototypeなどの組み込みオブジェクトに値を書き込まれる脆弱性が見つかりました。ページ全体の描画や、ほかのアプリケーションの動作が崩れるおそれがあります。修正版の13.1.0で直っているため、Highchartsを13.1.0以降に更新してください。
AI summary
Written by an external AI model and may contain mistakes. Check the original description and references below before acting on it.
Highcharts JSの13.0.0から13.1.0までに、グラフのデータ列を作る処理で、Object.prototypeなどの組み込みオブジェクトに値を書き込まれる脆弱性が見つかりました。ページ全体の描画や、ほかのアプリケーションの動作が崩れるおそれがあります。修正版の13.1.0で直っているため、Highchartsを13.1.0以降に更新してください。
Affected packages
| Ecosystem | Package | Affected | Fixed |
|---|---|---|---|
| highcharts | highcharts | — | — |
| npm | highcharts |
≥ 13.0.0, < 13.1.0 |
13.1.0 |
Original description The description as published by the source.
Impact
When series columns are built from point objects, the point option keys are used directly as data column ids, so the write that populates a column reaches Object.prototype and the Object constructor. Keys named __proto__ and constructor survive JSON.parse as own enumerable properties, so an attacker who controls the point objects can set integer-keyed properties on Object.prototype, one per point index, to values of their choosing. Named properties cannot be reached this way. The integer keys still affect every object in the page: reading an out-of-range index on any array or plain object returns the attacker's value, and for...in over any object yields the injected keys, so unrelated code can take branches it should not using attacker-supplied data, and rendering can fail as a side effect. The properties remain in place once the chart has been built, and no user interaction is required beyond rendering the chart.
Consequences beyond disruption depend on the consuming application.
Workarounds
Drop-in fix - for any versions affected (6.1.0-13.0.2).
Add the below IIFE to run after Highcharts is loaded.
;!function(t){if(t&&t.Point&&!t.Point.prototype.protoPollutionPatched){var o=t.Point.prototype,r=o.optionsToObject,e=o.setNestedProperty,n=Object.prototype.hasOwnProperty;o.optionsToObject=function(t){if(t&&"object"==typeof t&&!Array.isArray(t)&&(n.call(t,"__proto__")||n.call(t,"constructor"))){var o={};for(var e in t)n.call(t,e)&&!c(…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com