# CVE-2023-22731: Improper Control of Generation of Code in Twig rendered views in shopware

- Severity: Critical 10.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/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.44%, higher than 73% of CVEs (2026-12-01)
- Published: 2023-01-17T21:31:45.875Z
- Modified: 2026-06-17T05:36:03.243Z
- Also known as: GHSA-93cw-f5jj-x85w
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- shopware platform: < 6.4.18.1
- shopware/platform (Packagist): before 6.4.18.1
- shopware/core (Packagist): before 6.4.18.1
- shopware shopware: before 6.4.18.1

## Every score

- GitHub_M: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- GitHub: 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:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## 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

- CVE List: [CVE-2023-22731](https://www.cve.org/CVERecord?id=CVE-2023-22731), CVE Terms of Use, modified 2025-03-10
- GitHub Advisory Database: [GHSA-93cw-f5jj-x85w](https://github.com/advisories/GHSA-93cw-f5jj-x85w), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2023-22731](https://nvd.nist.gov/vuln/detail/CVE-2023-22731), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-22731 · Whole record: https://cve.day/CVE-2023-22731.json · Rebuilt by cve.day 2026-11-25T22:58:21.624Z
