CVE-2024-42356

Shopware vulnerable to Server Side Template Injection in Twig using Context functions

HIGH
7.2
CVSS Score
Published: August 8, 2024 at 02:52 PM UTC
Updated: June 17, 2026 at 07:49 AM UTC
1 product affected across 1 vendorShopware

Using shopware by shopware?

Get instant alerts when new vulnerabilities affect shopware - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.2
Exploit prediction
EPSS 0.6%
SSVC
PoC

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≤ 6.5.8.12v ≤ 6.6.5.0v < 6.5.8.136.6.0.0 ≤ v ≤ 6.6.5.06.6.0.0 ≤ v < 6.6.5.16.6.0.0
Affected range stops below 6.5.8.13, so it looks safe — our inference, not a vendor statement
Affected range stops below 6.6.5.1, so it looks safe — our inference, not a vendor statement

SSVC — Action Prioritization

SSVCPoCNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
HIGH
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-1336CWE-94

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card