CVE-2023-2017:
Improper Control of Generation of Code in Twig rendered views
8.8
CVSS ScoreBasic Information
CVE ID
GHSA ID
EPSS Score
-
CWE
Published
4/18/2023
Updated
4/28/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
shopware/platform | composer | <= 6.4.20.0 | 6.4.20.1 |
shopware/core | composer | <= 6.4.20.0 | 6.4.20.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the SecurityExtension class's Twig filter implementations (map, filter, reduce, sort). These functions validated only string-based callables against an allow list, but failed to check array-based callables (e.g., [ClassName, 'method']). This allowed attackers to bypass the allow list by crafting array-format PHP closures, leading to arbitrary code execution. The STAR Labs report demonstrates concrete exploitation via these filters using static method calls (e.g., CacheValueCompressor::uncompress, VarDumper::setHandler), confirming the vulnerability pattern. The functions' code structure (checking only is_string) and the documented bypass methods justify high confidence.