6.2medium
Fix prototype pollution in the zrender merge and clone helper methods
- Severity
- 6.2medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.27% (higher than 70% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-fhv8-fx5f-7fxf
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| ecomfe zrender | < 5.2.1 | CVE List |
| zrender (npm) | from 5.0.0 before 5.2.1, before 4.3.3 | GitHub Advisory Database |
| baidu zrender | before 5.2.1 | NVD |
All scores
| GitHub_M | 6.2medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 6.2medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.5high CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
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
NVD (es)
ZRender es una librería gráfica ligera que permite dibujar en 2D para Apache ECharts. En versiones anteriores a 5.2.1, el uso de los métodos de ayuda "merge" y "clone" en el módulo "src/core/util.ts" resulta en una contaminación de prototipo. Esto afecta a la popular biblioteca de visualización de datos Apache ECharts, que usa y exporta estos dos métodos directamente. La página de GitHub Security Advisory para esta vulnerabilidad contiene una prueba de concepto. Este problema está parcheado en la versión 5.2.1 de ZRender. Se presenta una solución disponible: Comprueba si presenta "__proto__" en las claves del objeto. Omitirlo antes de usarlo como parámetro en estos métodos afectados. O en "echarts.util.merge" y "setOption" si el proyecto esta usando ECharts
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-39227 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-fhv8-fx5f-7fxf changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-39227 changed 2026-06-17 | Public domain |