Options structure open to XSS if passed unfiltered
cve-program · CVE-2021-29489
PublishedHighcharts JS is a JavaScript charting library based on SVG. In Highcharts versions 8 and earlier, the chart options structure was not systematically filtered for XSS vectors. The potential impact was that content from untrusted sources could execute code in the end user's browser. The vulnerability is patched in version 9. As a workaround, implementers who are not able to upgrade may apply DOMPurify recursively to the options structure to filter out malicious markup.
Read the publisher's advisoryeuvd · EUVD-2021-1014
PublishedHighcharts JS is a JavaScript charting library based on SVG. In Highcharts versions 8 and earlier, the chart options structure was not systematically filtered for XSS vectors. The potential impact was that content from untrusted sources could execute code in the end user's browser. The vulnerability is patched in version 9. As a workaround, implementers who are not able to upgrade may apply DOMPurify recursively to the options structure to filter out malicious markup.
Read the publisher's advisorynvd · CVE-2021-29489
PublishedHighcharts JS is a JavaScript charting library based on SVG. In Highcharts versions 8 and earlier, the chart options structure was not systematically filtered for XSS vectors. The potential impact was that content from untrusted sources could execute code in the end user's browser. The vulnerability is patched in version 9. As a workaround, implementers who are not able to upgrade may apply DOMPurify recursively to the options structure to filter out malicious markup.
Read the publisher's advisoryosv · GHSA-8j65-4pcq-xq95
Published### Impact In Highcharts versions 8 and earlier, the chart options structure was not systematically filtered for XSS vectors. The potential impact was that content from untrusted sources could execute code in the end user's browser. Especially when using the `useHTML` flag, HTML string options would be inserted unfiltered directly into the DOM. When `useHTML` was false, malicious code could be inserted by using various character replacement tricks or malformed HTML. If your chart configuration comes from a trusted source like a static setup or pre-filtered HTML (or no markup at all in the configuration), you are not impacted. ### Patches In version 9, the whole rendering layer was refactored to use an DOMParser, an AST and tag and HTML allow-listing to make sure only safe content entered the DOM. In addition, prototype pollution was stopped. ### Workarounds Implementers who are not able to upgrade may apply [DOMPurify](https://github.com/cure53/DOMPurify) recursively [to the options structure](https://jsfiddle.net/highcharts/zd3wcm5L/) to filter out malicious markup. ### References * Details on the improved [Highcharts security](https://www.highcharts.com/docs/chart-concepts/security) * [The AST and TextBuilder refactoring](https://github.com/highcharts/highcharts/pull/14913) * [The fix for prototype pollution](https://github.com/highcharts/highcharts/pull/14884) ### For more information If you have any questions or comments about this advisory: * Visit our [support page](https://www.highcharts.com/blog/support/) * For more Email us at [[email protected]](mailto:[email protected])
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2021-29489 · CVE overview and exploitation status
cve-program · CVE-2021-29489
- https://github.com/highcharts/highcharts/security/advisories/GHSA-8j65-4pcq-xq95
- https://security.netapp.com/advisory/ntap-20210622-0005/
euvd · EUVD-2021-1014
- https://github.com/highcharts/highcharts/security/advisories/GHSA-8j65-4pcq-xq95
- https://security.netapp.com/advisory/ntap-20210622-0005/
nvd · CVE-2021-29489
- https://github.com/highcharts/highcharts/security/advisories/GHSA-8j65-4pcq-xq95
- https://security.netapp.com/advisory/ntap-20210622-0005/
osv · GHSA-8j65-4pcq-xq95
Related changes
Linked by CVE identifierNo related changes are available here.