Improper Control of Generation of Code in Twig Rendered Views in Shopware

Summary

CVECVE-2023-2017
StatePUBLISHED
AssignerSTAR_Labs
Source PriorityCVE Program / NVD first with legacy fallback
Published2023-04-17 11:15:42 UTC
Updated2026-10-24 13:10:00 UTC
DescriptionServer-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


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary8.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
3.1[email protected]Secondary8.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
3.1CNACVSS8.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS: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)

TypeVendorProductVersionUpdateEditionLanguage
Application Shopware Shopware 6.5.0.0 rc1 All All
Application Shopware Shopware 6.5.0.0 rc2 All All
Application Shopware Shopware 6.5.0.0 rc3 All All
Application Shopware Shopware All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
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

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

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report