CVE-2021-39227 json
Fix prototype pollution in the zrender merge and clone helper methods
published 5y ago modified 4mo ago also GHSA-fhv8-fx5f-7fxf , EUVD-2021-2053
- cvss
- 6.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.3%
- EPSS 1.3% chance of exploitation in 30 days, percentile 69%
- public exploits
- 0
- none known
Summary
ZRender is a lightweight graphic library providing 2d draw for Apache ECharts. In versions prior to 5.2.1, using `merge` and `clone` helper methods in the `src/core/util.ts` module results in prototype pollution. It affects the popular data visualization library Apache ECharts, which uses and exports these two methods directly. The GitHub Security Advisory page for this vulnerability contains a proof of concept. This issue is patched in ZRender version 5.2.1. One workaround is available: Check if there is `__proto__` in the object keys. Omit it before using it as an parameter in these affected methods. Or in `echarts.util.merge` and `setOption` if project is using ECharts.
Patch / fix
- npm zrender 4.3.3, 5.2.1
- baidu zrender 5.2.1
- github.com/ecomfe/zrender#826 pull request
- github.com/ecomfe/zrender/releases/tag/5.2.1 release
Is CVE-2021-39227 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerExploit prediction
1.27% chance of exploitation in the next 30 days, higher than 69% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | zrender | >=5.0.0, <5.2.1 <4.3.3 |
5.2.1 4.3.3 |
Affected products
- ecomfe zrender
Classification
References
-
github.com
/ecomfe/zrender/pull/826
web, patch, third-party-advisory
-
github.com
/ecomfe/zrender/security/advisories/GHSA-fhv8-fx5f-7fxf
web, third-party-advisory
-
github.com
/ecomfe/zrender/releases/tag/5.2.1
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-39227
advisory
-
github.com
/ecomfe/zrender
package
Sources
- CVE List CVE-2021-39227
- GitHub Advisory GHSA-fhv8-fx5f-7fxf
- NVD CVE-2021-39227
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.