CVE-2024-42356
Shopware vulnerable to Server Side Template Injection in Twig using Context functions
Also known as GHSA-35jp-8cgg-p4wj
Mitigation
- Upgrade shopware/core to one of 6.5.8.13, 6.6.5.1 (or later in the same release line).
- Upgrade shopware/platform to one of 6.5.8.13, 6.6.5.1 (or later in the same release line).
Who should check
- Projects that depend on Packagist package shopware/core (< 6.5.8.13)
- Projects that depend on Packagist package shopware/platform (< 6.5.8.13)
- Anyone running shopware <= 6.5.8.12; >= 6.6.0.0, <= 6.6.5.0
Vulnerability facts
- Affected
- shopware/core < 6.5.8.13; shopware/platform < 6.5.8.13
- Fixed in
- 6.5.8.13, 6.6.5.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 8.3 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: Low
- EPSS
- 1.24% chance of exploitation in 30 days (percentile 69, 2026-11-26)
- CWE
- CWE-1336
- Modified
Description
Shopware is an open commerce platform. Prior to versions 6.6.5.1 and 6.5.8.13, the `context` variable is injected into almost any Twig Template and allows to access to current language, currency information. The context object allows also to switch for a short time the scope of the Context as a helper with a callable function. The function can be called also from Twig and as the second parameter allows any callable, it's possible to call from Twig any statically callable PHP function/method. It's not possible as customer to provide any Twig code, the attacker would require access to Administration to exploit it using Mail templates or using App Scripts. Update to Shopware 6.6.5.1 or 6.5.8.13 to receive a patch. For older versions of 6.1, 6.2, 6.3 and 6.4 corresponding security measures are also available via a plugin.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Packagist shopware/core | < 6.5.8.13 | 6.5.8.13, 6.6.5.1 | osv |
| Packagist shopware/platform | < 6.5.8.13 | 6.5.8.13, 6.6.5.1 | osv |
| shopware | <= 6.5.8.12; >= 6.6.0.0, <= 6.6.5.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-42356. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-42356.md Affected: shopware/core < 6.5.8.13; shopware/platform < 6.5.8.13 Fixed in: 6.5.8.13, 6.6.5.1 Steps: 1. Search this machine and project for shopware/core (Packagist), shopware/platform (Packagist), shopware: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
- https://github.com/shopware/core/commit/04183e0c02af3b404eb7d52c683734bfe0595038
- https://github.com/shopware/core/commit/a784aa1cec0624e36e0ee4d41aeebaed40e0442f
- https://github.com/shopware/shopware/commit/8504ba7e56e53add6a1d5b9d45015e3d899cd0ac
- https://github.com/shopware/shopware/commit/e43423bcc93c618c3036f94c12aa29514da8cf2e
FAQ
Is CVE-2024-42356 being exploited?
There is no confirmed exploitation: CVE-2024-42356 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.24% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-42356?
High: CVSS 8.3 (v3.1, scored by CNA). Remote, login needed.
Which versions are affected by CVE-2024-42356?
shopware/core < 6.5.8.13; shopware/platform < 6.5.8.13.
Is there a fix for CVE-2024-42356?
Yes. Fixed in 6.5.8.13, 6.6.5.1. Upgrade shopware/core to one of 6.5.8.13, 6.6.5.1 (or later in the same release line). Upgrade shopware/platform to one of 6.5.8.13, 6.6.5.1 (or later in the same release line).
How do I check if I'm affected by CVE-2024-42356?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.