# CVE-2024-42356: Shopware vulnerable to Server Side Template Injection in Twig using Context functions

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.3
- **CVSS:** 8.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 1.24% (percentile 69, 2026-11-26)
- **CWE:** CWE-1336
- **Aliases:** GHSA-35jp-8cgg-p4wj
- **Published:** 2024-08-08T14:50:11.000Z
- **Modified:** 2026-06-17T07:49:19.130Z

## 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

## 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

- Packagist `shopware/core`: affected \< 6.5.8.13; fixed 6.5.8.13, 6.6.5.1 (osv)
- Packagist `shopware/platform`: affected \< 6.5.8.13; fixed 6.5.8.13, 6.6.5.1 (osv)
- shopware: \<= 6.5.8.12; \>= 6.6.0.0, \<= 6.6.5.0 (cvelist)

## 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).

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

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

## References

- vendor: <https://github.com/shopware/shopware/security/advisories/GHSA-35jp-8cgg-p4wj>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2024-42356>
- patch: <https://github.com/shopware/core/commit/04183e0c02af3b404eb7d52c683734bfe0595038>
- patch: <https://github.com/shopware/core/commit/a784aa1cec0624e36e0ee4d41aeebaed40e0442f>
- patch: <https://github.com/shopware/shopware/commit/8504ba7e56e53add6a1d5b9d45015e3d899cd0ac>
- patch: <https://github.com/shopware/shopware/commit/e43423bcc93c618c3036f94c12aa29514da8cf2e>
- other: <https://github.com/shopware/shopware>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-42356>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-35jp-8cgg-p4wj> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2024-42356> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-42356>
