10.0critical
Improper Control of Generation of Code in Twig rendered views in shopware
- Severity
- 10.0critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.44% (higher than 73% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-93cw-f5jj-x85w
Description
Shopware is an open source commerce platform based on Symfony Framework and Vue js. In a Twig environment **without the Sandbox extension**, it is possible to refer to PHP functions in twig filters like `map`, `filter`, `sort`. This allows a template to call any global PHP function and thus execute arbitrary code. The attacker must have access to a Twig environment in order to exploit this vulnerability. This problem has been fixed with 6.4.18.1 with an override of the specified filters until the integration of the Sandbox extension has been finished. Users are advised to upgrade. Users of major versions 6.1, 6.2, and 6.3 may also receive this fix via a plugin.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| shopware platform | < 6.4.18.1 | CVE List |
| shopware/platform (Packagist) | before 6.4.18.1 | GitHub Advisory Database |
| shopware/core (Packagist) | before 6.4.18.1 | GitHub Advisory Database |
| shopware shopware | before 6.4.18.1 | NVD |
All scores
| GitHub_M | 10.0critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
| GitHub | 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 | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
Shopware is an open source commerce platform based on Symfony Framework and Vue js. In a Twig environment **without the Sandbox extension**, it is possible to refer to PHP functions in twig filters like `map`, `filter`, `sort`. This allows a template to call any global PHP function and thus execute arbitrary code. The attacker must have access to a Twig environment in order to exploit this vulnerability. This problem has been fixed with 6.4.18.1 with an override of the specified filters until the integration of the Sandbox extension has been finished. Users are advised to upgrade. Users of major versions 6.1, 6.2, and 6.3 may also receive this fix via a plugin.
GitHub Advisory Database
Impact
In Twig environment without the Sandbox extension, it is possible to refer to PHP functions in twig filters like map, filter, sort. This allows in the template to call any global PHP function.
Patches
The problem has been fixed with 6.4.18.1 with an override of the specified filters until the integration of the Sandbox extension has been finished.
Workarounds
For older versions of 6.1, 6.2, and 6.3, corresponding security measures are also available via a plugin. For the full range of functions, we recommend updating to the latest Shopware version.
References
NVD (es)
Shopware es una plataforma de comercio de código abierto basada en Symfony Framework y Vue js. En un entorno Twig **sin la extensión Sandbox**, es posible hacer referencia a funciones PHP en filtros twig como `mapa`, `filtro`, `ordenar`. Esto permite que una plantilla llame a cualquier función PHP global y así ejecute código arbitrario. El atacante debe tener acceso a un entorno Twig para poder explotar esta vulnerabilidad. Este problema se solucionó con 6.4.18.1 con una anulación de los filtros especificados hasta que finalice la integración de la extensión Sandbox. Se recomienda a los usuarios que actualicen. Los usuarios de las versiones principales 6.1, 6.2 y 6.3 también pueden recibir esta solución a través de un complemento.
References
| https://github.com/shopware/platform/security/advisories/GHSA-93cw-f5jj-x85w | third-party-advisory, web | |
| https://github.com/shopware/platform/commit/89d1ea154689cb6202e0d3a0ceeae0febb0c09e1 | patch, third-party-advisory, web | |
| https://docs.shopware.com/en/shopware-6-en/security-updates/security-update-01-2023?category=security-updates | patch, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2023-22731 | advisory | |
| https://github.com/shopware/platform | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-22731 changed 2025-03-10 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-93cw-f5jj-x85w changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2023-22731 changed 2026-06-17 | Public domain |