{"id":"CVE-2023-2017","aliases":["EUVD-2023-1231","GHSA-7v2v-9rm4-7m8f"],"status":"published","title":"Improper Control of Generation of Code in Twig Rendered Views in Shopware","description":"Server-side Template Injection (SSTI) in Shopware 6 (\u003c= v6.4.20.0, v6.5.0.0-rc1 \u003c= v6.5.0.0-rc4), affecting both shopware/core and shopware/platform GitHub repositories, allows remote attackers with access to a Twig environment without the Sandbox extension to bypass the validation checks in `Shopware\\Core\\Framework\\Adapter\\Twig\\SecurityExtension` and call any arbitrary PHP function and thus execute arbitrary code/commands via usage of fully-qualified names, supplied as array of strings, when referencing callables. Users are advised to upgrade to v6.4.20.1 to resolve this issue. This is a bypass of CVE-2023-22731.","severity":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-08","score":0.02066,"percentile":0.81514,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1336","CWE-184","CWE-94"],"published":"2023-04-17T10:18:27Z","modified":"2026-10-28T02:30:31Z","fixes":[{"ecosystem":"Packagist","package":"shopware/platform","fixed_in":["6.4.20.1"],"sources":["ghsa","osv"]},{"ecosystem":"Packagist","package":"shopware/core","fixed_in":["6.4.20.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"shopware/platform","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"6.4.20.0"},{"fixed":"6.4.20.1"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"shopware/core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"6.4.20.0"},{"fixed":"6.4.20.1"}]}]},{"source":"osv","ecosystem":"Packagist","package":"shopware/platform","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.4.20.1"}]}],"versions":["6.3.0.0","6.3.0.1","6.3.0.2","6.3.1.0","6.3.1.1","6.3.2.0","6.3.2.1","6.3.3.0","6.3.3.1","6.3.4.0","6.3.4.1","6.3.5.0","6.3.5.1","6.3.5.2","6.3.5.3","6.3.5.4","6.4.0.0","6.4.0.0-RC1","6.4.1.0","6.4.1.1","6.4.1.2","6.4.10.0","6.4.10.1","6.4.11.0","6.4.11.1","6.4.12.0","6.4.13.0","6.4.14.0","6.4.15.0","6.4.15.1","6.4.15.2","6.4.16.0","6.4.16.1","6.4.17.0","6.4.17.1","6.4.17.2","6.4.18.0","6.4.18.1","6.4.19.0","6.4.2.0","6.4.2.1","6.4.20.0","6.4.3.0","6.4.3.1","6.4.4.0","6.4.4.1","6.4.5.0","6.4.5.1","6.4.6.0","6.4.6.1","6.4.7.0","6.4.8.0","6.4.8.1","6.4.8.2","6.4.9.0","v6.0.0+ea2","v6.1.0","v6.1.0-rc1","v6.1.0-rc2","v6.1.0-rc3","v6.1.0-rc4","v6.1.1","v6.1.2","v6.1.3","v6.1.4","v6.1.5","v6.1.6","v6.2.0","v6.2.0-RC1","v6.2.1","v6.2.2","v6.2.3"]},{"source":"osv","ecosystem":"Packagist","package":"shopware/core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.4.20.1"}]}],"versions":["6.3.0.0","6.3.0.1","6.3.0.2","6.3.1.0","6.3.1.1","6.3.2.0","6.3.2.1","6.3.3.0","6.3.3.1","6.3.4.0","6.3.4.1","6.3.5.0","6.3.5.1","6.3.5.2","6.3.5.3","6.3.5.4","6.4.0.0","6.4.0.0-RC1","6.4.1.0","6.4.1.1","6.4.1.2","6.4.10.0","6.4.10.1","6.4.11.0","6.4.11.1","6.4.12.0","6.4.13.0","6.4.14.0","6.4.15.0","6.4.15.1","6.4.15.2","6.4.16.0","6.4.16.1","6.4.17.0","6.4.17.1","6.4.17.2","6.4.18.0","6.4.18.1","6.4.19.0","6.4.2.0","6.4.2.1","6.4.20.0","6.4.3.0","6.4.3.1","6.4.4.0","6.4.4.1","6.4.5.0","6.4.5.1","6.4.6.0","6.4.6.1","6.4.7.0","6.4.8.0","6.4.8.1","6.4.8.2","6.4.9.0","v6.0.0+ea2","v6.1.0","v6.1.0-rc1","v6.1.0-rc2","v6.1.0-rc3","v6.1.0-rc4","v6.1.1","v6.1.2","v6.1.3","v6.1.4","v6.1.5","v6.1.6","v6.2.0","v6.2.0-RC1","v6.2.1","v6.2.2","v6.2.3"]}],"products":[{"vendor":"shopware","product":"shopware"},{"vendor":"shopware ag","product":"shopware 6"}],"references":[{"url":"https://docs.shopware.com/en/shopware-6-en/security-updates/security-update-04-2023","tags":["vendor-advisory","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://github.com/shopware/platform/security/advisories/GHSA-7v2v-9rm4-7m8f","tags":["vendor-advisory","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://starlabs.sg/advisories/23/23-2017/","tags":["third-party-advisory","x_transferred","Exploit","Mitigation","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-2017","tags":["advisory"]},{"url":"https://github.com/shopware/platform/releases/tag/v6.4.20.1","tags":["web"]},{"url":"https://github.com/shopware/shopware/security/advisories/GHSA-7v2v-9rm4-7m8f","tags":["web"]},{"url":"https://starlabs.sg/advisories/23/23-2017","tags":["web"]},{"url":"https://github.com/advisories/GHSA-7v2v-9rm4-7m8f"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/2xxx/CVE-2023-2017.json","tags":["advisory"]},{"url":"https://github.com/shopware/platform","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2023-2017","title":"Improper Control of Generation of Code in Twig Rendered Views in Shopware","description":"Server-side Template Injection (SSTI) in Shopware 6 (\u003c= v6.4.20.0, v6.5.0.0-rc1 \u003c= v6.5.0.0-rc4), affecting both shopware/core and shopware/platform GitHub repositories, allows remote attackers with access to a Twig environment without the Sandbox extension to bypass the validation checks in `Shopware\\Core\\Framework\\Adapter\\Twig\\SecurityExtension` and call any arbitrary PHP function and thus execute arbitrary code/commands via usage of fully-qualified names, supplied as array of strings, when referencing callables. Users are advised to upgrade to v6.4.20.1 to resolve this issue. This is a bypass of CVE-2023-22731.\n","status":"published","published":"2023-04-17T10:18:27.543Z","modified":"2025-02-05T20:46:43.936Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-184","CWE-1336"],"updated_at":"2026-11-02T14:35:24.004321Z"}],"euvd":[{"id":"EUVD-2023-1231","description":"Server-side Template Injection (SSTI) in Shopware 6 (\u003c= v6.4.20.0, v6.5.0.0-rc1 \u003c= v6.5.0.0-rc4), affecting both shopware/core and shopware/platform GitHub repositories, allows remote attackers with access to a Twig environment without the Sandbox extension to bypass the validation checks in `Shopware\\Core\\Framework\\Adapter\\Twig\\SecurityExtension` and call any arbitrary PHP function and thus execute arbitrary code/commands via usage of fully-qualified names, supplied as array of strings, when referencing callables. Users are advised to upgrade to v6.4.20.1 to resolve this issue. This is a bypass of CVE-2023-22731.\n","status":"published","published":"2023-04-17T10:18:27Z","modified":"2025-02-05T20:46:43Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-03T00:04:03.798167Z"}],"ghsa":[{"id":"GHSA-7v2v-9rm4-7m8f","title":"Shopware Has Improper Control of Generation of Code in Twig rendered views","description":"### Impact\nWe fixed with [CVE-2023-22731](https://github.com/shopware/platform/security/advisories/GHSA-93cw-f5jj-x85w) Twig filters to only be executed with allowed functions. It is possible to pass PHP Closures as string or an array and array crafted PHP Closures was not checked against allow list\n\n### Patches\nThe problem has been fixed with 6.4.20.1 with an improved override.\n\n### Workarounds\nFor 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.","status":"published","published":"2023-04-18T13:14:20Z","modified":"2026-01-14T17:03:27Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-94","CWE-1336"],"updated_at":"2026-11-02T14:39:17.333958Z"}],"nvd":[{"id":"CVE-2023-2017","description":"Server-side Template Injection (SSTI) in Shopware 6 (\u003c= v6.4.20.0, v6.5.0.0-rc1 \u003c= v6.5.0.0-rc4), affecting both shopware/core and shopware/platform GitHub repositories, allows remote attackers with access to a Twig environment without the Sandbox extension to bypass the validation checks in `Shopware\\Core\\Framework\\Adapter\\Twig\\SecurityExtension` and call any arbitrary PHP function and thus execute arbitrary code/commands via usage of fully-qualified names, supplied as array of strings, when referencing callables. Users are advised to upgrade to v6.4.20.1 to resolve this issue. This is a bypass of CVE-2023-22731.\n","status":"published","published":"2023-04-17T11:15:42.16Z","modified":"2026-10-24T13:10:00.147Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-184","CWE-1336","CWE-94"],"updated_at":"2026-11-02T14:07:55.652109Z"}],"osv":[{"id":"CVE-2023-2017","title":"Improper Control of Generation of Code in Twig Rendered Views in Shopware","description":"Server-side Template Injection (SSTI) in Shopware 6 (\u003c= v6.4.20.0, v6.5.0.0-rc1 \u003c= v6.5.0.0-rc4), affecting both shopware/core and shopware/platform GitHub repositories, allows remote attackers with access to a Twig environment without the Sandbox extension to bypass the validation checks in `Shopware\\Core\\Framework\\Adapter\\Twig\\SecurityExtension` and call any arbitrary PHP function and thus execute arbitrary code/commands via usage of fully-qualified names, supplied as array of strings, when referencing callables. Users are advised to upgrade to v6.4.20.1 to resolve this issue. This is a bypass of CVE-2023-22731.\n","status":"published","published":"2023-04-17T10:18:27.543Z","modified":"2026-10-28T02:30:31.250617431Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-1336","CWE-184"],"updated_at":"2026-11-02T15:44:30.334753Z"},{"id":"GHSA-7v2v-9rm4-7m8f","title":"Shopware Has Improper Control of Generation of Code in Twig rendered views","description":"### Impact\nWe fixed with [CVE-2023-22731](https://github.com/shopware/platform/security/advisories/GHSA-93cw-f5jj-x85w) Twig filters to only be executed with allowed functions. It is possible to pass PHP Closures as string or an array and array crafted PHP Closures was not checked against allow list\n\n### Patches\nThe problem has been fixed with 6.4.20.1 with an improved override.\n\n### Workarounds\nFor 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.","status":"published","published":"2023-04-18T13:14:20Z","modified":"2026-09-10T03:49:53.609765947Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-1336","CWE-94"],"updated_at":"2026-11-02T15:46:41.349637Z"}]}}
