Improper Control of Generation of Code in Twig Rendered Views in Shopware
Summary
| CVE | CVE-2023-2017 |
|---|---|
| State | PUBLISHED |
| Assigner | STAR_Labs |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2023-04-17 11:15:42 UTC |
| Updated | 2026-10-24 13:10:00 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 8.8 HIGH from [email protected]
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Problem Types: CWE-184 | CWE-1336 | CWE-94 | CWE-184 CWE-184 Incomplete List of Disallowed Inputs | CWE-1336 CWE-1336 Improper Neutralization of Special Elements Used in a Template Engine
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 8.8 | HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | [email protected] | Secondary | 8.8 | HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | CNA | CVSS | 8.8 | HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
LowUser Interaction
NoneScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD Known Affected Configurations (CPE 2.3)
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Shopware AG | Shopware 6 | affected 6.4.20.0 semver | Not specified |
| CNA | Shopware AG | Shopware 6 | affected 6.5.0.0-rc1 6.5.0.0-rc4 semver | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| Shopware 6 - Security Updates - Security Update 04/2023 | af854a3a-2127-422b-91ae-364da2661108 | docs.shopware.com | Vendor Advisory |
| (CVE-2023-2017) Shopware 6 Server-side Template Injection (SSTI) via Twig Security Extension | STAR Labs | af854a3a-2127-422b-91ae-364da2661108 | starlabs.sg | Exploit, Mitigation, Third Party Advisory |
| Improper Control of Generation of Code in Twig rendered views · Advisory · shopware/platform · GitHub | af854a3a-2127-422b-91ae-364da2661108 | github.com | Vendor Advisory |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Ngo Wei Lin (@Creastery) of STAR Labs SG Pte. Ltd. (@starlabs_sg) (en)
Additional Advisory Data
Solutions
CNA: Users are advised to upgrade to v6.4.20.1 to resolve this issue.
There are currently no legacy QID mappings associated with this CVE.