CVE-2021-39227
JSON

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 packageVersionsReported by
ecomfe zrender< 5.2.1CVE List
zrender (npm)from 5.0.0 before 5.2.1, before 4.3.3GitHub Advisory Database
baidu zrenderbefore 5.2.1NVD

All scores

GitHub_M6.2medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub6.2medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV: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

Sources

SourceRecordLicence
CVE ListCVE-2021-39227 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-fhv8-fx5f-7fxf changed 2026-07-08CC-BY-4.0
NVDCVE-2021-39227 changed 2026-06-17Public domain