CVE-2023-22731

Improper Control of Generation of Code in Twig rendered views in shopware

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.

Category

9.9
CVSS
Severity: Critical
CVSS 3.1 •
EPSS 4.61% Top 15%
Vendor Advisory shopware.com
Affected: shopware platform
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2023-22731?
CVE-2023-22731 has been scored as a critical severity vulnerability.
How to fix CVE-2023-22731?
To fix CVE-2023-22731, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2023-22731 being actively exploited in the wild?
It is possible that CVE-2023-22731 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~5% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2023-22731?
CVE-2023-22731 affects shopware platform.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.