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

- Severity: Medium 6.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.27%, higher than 70% of CVEs (2026-12-01)
- Published: 2021-09-17T14:10:10.000Z
- Modified: 2026-07-08T06:28:58.491Z
- Also known as: GHSA-fhv8-fx5f-7fxf
- Weaknesses: CWE-915, CWE-1321
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- ecomfe zrender: < 5.2.1
- zrender (npm): from 5.0.0 before 5.2.1; before 4.3.3
- baidu zrender: before 5.2.1

## Every score

- GitHub_M: CVSS:3.1 6.2 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 6.2 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/ecomfe/zrender/security/advisories/GHSA-fhv8-fx5f-7fxf> (third-party-advisory, web)
- <https://github.com/ecomfe/zrender/pull/826> (patch, third-party-advisory, web)
- <https://github.com/ecomfe/zrender/releases/tag/5.2.1> (release-notes, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-39227> (advisory)
- <https://github.com/ecomfe/zrender> (package)

## Sources

- CVE List: [CVE-2021-39227](https://www.cve.org/CVERecord?id=CVE-2021-39227), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-fhv8-fx5f-7fxf](https://github.com/advisories/GHSA-fhv8-fx5f-7fxf), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-39227](https://nvd.nist.gov/vuln/detail/CVE-2021-39227), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-39227 · Whole record: https://cve.day/CVE-2021-39227.json · Rebuilt by cve.day 2026-11-25T22:58:04.030Z
