CVE-2023-22731 — Vulnerability in shopware/platform — CVE Details
Shopware vulnerable to Improper Control of Generation of Code in Twig rendered views
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (1.58%). Schedule for your next planned update.
Does your project use an affected shopware/platform version?
Paste your composer.lock to check it for CVE-2023-22731 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Impact
In Twig environment without the Sandbox extension, it is possible to refer to PHP functions in twig filters like map, filter, sort. This allows in the template to call any global PHP function.
Patches
The problem has been fixed with 6.4.18.1 with an override of the specified filters until the integration of the Sandbox extension has been finished.
Workarounds
For 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.
References
Advisory Timeline
- First published January 17, 2023 (1408 days ago).
- Last revised November 8, 2023 — 294 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "shopware/platform:^6.4.18.1"
composer require "shopware/core:^6.4.18.1"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: Packagist (2).
| Package | Fixed In |
|---|---|
| shopware/platform Packagist · Affected: 6.3.0.0, 6.3.0.1, 6.3.0.2, 6.3.1.0 (+65 more) | 6.4.18.1 |
| shopware/core Packagist · Affected: 6.3.0.0, 6.3.0.1, 6.3.0.2, 6.3.1.0 (+65 more) | 6.4.18.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-94Code InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/shopware/platform/security/advisories/GHSA-93cw-f5jj-x85wWEB
- https://nvd.nist.gov/vuln/detail/CVE-2023-22731ADVISORY
- https://github.com/shopware/platform/commit/89d1ea154689cb6202e0d3a0ceeae0febb0c09e1WEB
- https://docs.shopware.com/en/shopware-6-en/security-updates/security-update-01-2023?category=security-updatesWEB
- https://github.com/shopware/platformPACKAGE
Frequently Asked Questions
- What is CVE-2023-22731?
- Shopware vulnerable to Improper Control of Generation of Code in Twig rendered views. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
- How do I check if my project is affected by CVE-2023-22731?
- CVE-2023-22731 affects shopware/platform and shopware/core. It has a 1.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2023-22731 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This places it in the top quartile of EPSS-scored vulnerabilities — 75.9% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-63412CRITICAL
Jane: Instantiation RCE via query parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3)
- CVE-2024-22406CRITICAL
Blind SQL injection in shopware
- CVE-2026-63413CRITICAL
Jane: Instantiation RCE via header parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3)
- CVE-2024-42355HIGH
Shopware vulnerable to Server Side Template Injection in Twig using deprecation silence tag
- CVE-2024-42356HIGH
Shopware vulnerable to Server Side Template Injection in Twig using Context functions
- CVE-2026-31887HIGH
Shopware: Unauthenticated data extraction possible through store-api.order endpoint
- CVE-2026-31889HIGH
Shopware vulnerable to a potential take over of app credentials