CVE-2020-7746
chart.js: prototype pollution
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD. Rated lower by GHSA (high), Red Hat (high), Ubuntu (low).
Description
This affects the package chart.js before 2.9.4. The options parameter is not properly sanitized when it is processed. When the options are processed, the existing options (or the defaults options) are deeply merged with provided options. However, during this operation, the keys of the object being set are not checked, leading to a prototype pollution.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| debian 10 | node-chart.js | no fix listed |
| debian 11 | node-chart.js | 2.9.4+dfsg+~cs2.10.1-1 |
| debian 12 | node-chart.js | 2.9.4+dfsg+~cs2.10.1-1 |
| debian 13 | node-chart.js | 2.9.4+dfsg+~cs2.10.1-1 |
| debian 14 | node-chart.js | 2.9.4+dfsg+~cs2.10.1-1 |
| echo | node-chart.js | 2.9.4+dfsg+~cs2.10.1-1 |
| npm::GitHub Security Advisory npm | chart.js | 2.9.4 |
| ubuntu 20.04-ESM | node-chart.js | no fix listed |
References
- https://access.redhat.com/security/cve/CVE-2020-7746
- https://github.com/chartjs/Chart.js/pull/7920
- https://nvd.nist.gov/vuln/detail/CVE-2020-7746
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1019375
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBCHARTJS-1019376
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1019374
- https://snyk.io/vuln/SNYK-JS-CHARTJS-1018716
- https://www.cve.org/CVERecord?id=CVE-2020-7746