CVE-2021-39227: Fix prototype pollution in the zrender merge and clone helper methods
Impact Using merge and clone helper methods in the src/core/util.ts module will have prototype pollution. It will affect the popular data visualization library Apache ECharts, which is using and exported these two methods directly.
Patches It has been patched in https://github.com/ecomfe/zrender/pull/826. Users should update zrender to 5.2.1. and update echarts to 5.2.1 if project is using echarts.
References NA
For more information NA
Other sources
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/zrenderto a version that resolves this vulnerability.Fixed in 4.3.3 - Upgrade
Upgrade
npm/zrenderto a version that resolves this vulnerability.Fixed in 5.2.1 - Upgrade
Upgrade
zrenderto a version that resolves this vulnerability.Fixed in 5.2.1 - Upgrade
Upgrade
Apache EChartsto a version that resolves this vulnerability.Fixed in 5.2.1 - Compensating control
Workaround: before using `merge` and `clone` helper methods in `src/core/util.ts`, check if there is `__proto__` in the object keys (prototype-pollution guard).
Event History
Frequently Asked Questions
What is the severity of CVE-2021-39227?
CVE-2021-39227 is categorized as high severity due to its potential for prototype pollution in applications using Apache ECharts.
How do I fix CVE-2021-39227?
To fix CVE-2021-39227, update the zrender package to version 4.3.3 or 5.2.1.
Which versions are affected by CVE-2021-39227?
CVE-2021-39227 affects zrender versions up to 4.3.2 and 5.0.0 to 5.2.0.
What component is primarily affected by CVE-2021-39227?
The primary component affected by CVE-2021-39227 is the merge and clone helper methods in the src/core/util.ts module of the zrender library.
What impact does CVE-2021-39227 have on applications?
CVE-2021-39227 can lead to prototype pollution, potentially allowing attackers to manipulate the application state.