CVE-2021-39227: Fix prototype pollution in the zrender merge and clone helper methods

Published Sep 17, 2021
·
Updated

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

3 affected componentsFixes available
Baidu Zrender<5.2.1
npm/zrender<=4.3.2
4.3.3
npm/zrender>=5.0.0<5.2.1
5.2.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/zrender to a version that resolves this vulnerability.

    Fixed in 4.3.3
  2. Upgrade

    Upgrade npm/zrender to a version that resolves this vulnerability.

    Fixed in 5.2.1
  3. Upgrade

    Upgrade zrender to a version that resolves this vulnerability.

    Fixed in 5.2.1
  4. Upgrade

    Upgrade Apache ECharts to a version that resolves this vulnerability.

    Fixed in 5.2.1
  5. 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

Sep 17, 2021
CVE Published
via MITRE·02:10 PM
Data Sourced
via MITRE·02:10 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Sep 20, 2021
Advisory Published
via GitHub·07:53 PM

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203