8.3
HIGH
CVE-2024-42356
Shopware Twig Code Injection Vulnerability
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.

INFO

Published Date :

Aug. 8, 2024, 3:15 p.m.

Last Modified :

Aug. 12, 2024, 3:34 p.m.

Remotely Exploitable :

Yes !

Impact Score :

5.5

Exploitability Score :

2.8
Affected Products

The following products are affected by CVE-2024-42356 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Shopware shopware

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2024-42356 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2024-42356 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • Initial Analysis by [email protected]

    Aug. 12, 2024

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://github.com/shopware/core/commit/04183e0c02af3b404eb7d52c683734bfe0595038 No Types Assigned https://github.com/shopware/core/commit/04183e0c02af3b404eb7d52c683734bfe0595038 Patch
    Changed Reference Type https://github.com/shopware/core/commit/a784aa1cec0624e36e0ee4d41aeebaed40e0442f No Types Assigned https://github.com/shopware/core/commit/a784aa1cec0624e36e0ee4d41aeebaed40e0442f Patch
    Changed Reference Type https://github.com/shopware/shopware/commit/8504ba7e56e53add6a1d5b9d45015e3d899cd0ac No Types Assigned https://github.com/shopware/shopware/commit/8504ba7e56e53add6a1d5b9d45015e3d899cd0ac Patch
    Changed Reference Type https://github.com/shopware/shopware/commit/e43423bcc93c618c3036f94c12aa29514da8cf2e No Types Assigned https://github.com/shopware/shopware/commit/e43423bcc93c618c3036f94c12aa29514da8cf2e Patch
    Changed Reference Type https://github.com/shopware/shopware/security/advisories/GHSA-35jp-8cgg-p4wj No Types Assigned https://github.com/shopware/shopware/security/advisories/GHSA-35jp-8cgg-p4wj Vendor Advisory
    Added CWE NIST CWE-94
    Added CPE Configuration OR *cpe:2.3:a:shopware:shopware:*:*:*:*:*:*:*:* versions up to (excluding) 6.5.8.13 *cpe:2.3:a:shopware:shopware:*:*:*:*:*:*:*:* versions from (including) 6.6.0.0 up to (excluding) 6.6.5.1
  • CVE Received by [email protected]

    Aug. 08, 2024

    Action Type Old Value New Value
    Added 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.
    Added Reference GitHub, Inc. https://github.com/shopware/shopware/security/advisories/GHSA-35jp-8cgg-p4wj [No types assigned]
    Added Reference GitHub, Inc. https://github.com/shopware/core/commit/04183e0c02af3b404eb7d52c683734bfe0595038 [No types assigned]
    Added Reference GitHub, Inc. https://github.com/shopware/core/commit/a784aa1cec0624e36e0ee4d41aeebaed40e0442f [No types assigned]
    Added Reference GitHub, Inc. https://github.com/shopware/shopware/commit/8504ba7e56e53add6a1d5b9d45015e3d899cd0ac [No types assigned]
    Added Reference GitHub, Inc. https://github.com/shopware/shopware/commit/e43423bcc93c618c3036f94c12aa29514da8cf2e [No types assigned]
    Added CWE GitHub, Inc. CWE-1336
    Added CVSS V3.1 GitHub, Inc. AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2024-42356 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2024-42356 weaknesses.

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability