CVE-2020-7746Chartjs Chart.js
Critical 9.8 No auth needed
Follow: this CVE · Chartjs · Chartjs Chart.js We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- 4.7% probability of exploitation in 30 days · percentile 93
- Auth required
- No
- Published
- Oct 29, 2020
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-1321
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Chart.js.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | chart.js |
< 2.9.4 |
2.9.4 |
npm install chart.js@2.9.4 |
Per OSV / GitHub Advisories (GHSA-h68q-55jf-x68w). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| chartjs | chart.js | < 2.9.4 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- snyk.io Exploit Third Party Advisory
- snyk.io Exploit Third Party Advisory
- snyk.io Exploit Third Party Advisory
- snyk.io Exploit Third Party Advisory