Loading...
Skip to main content

CVE-2024-42356 — Vulnerability in shopware/platform — CVE Details

HIGH

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

Published August 8, 2024Updated August 12, 2024Source: osv

Summary

### Impact 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. Example call from PHP: ```php $context->scope(Context::SYSTEM_SCOPE, static function (Context $context) use ($mediaService, $media, &$fileBlob): void { $fileBlob = $mediaService->loadFile($media->getId(), $context); }); ``` This 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. ### Patches Update to Shopware 6.6.5.1 or 6.5.8.13 ### Workarounds For older versions of 6.1, 6.2, 6.3 and 6.4 corresponding security measures are also available via a plugin. For the full range of functions, we recommend updating to the latest Shopware version.

Advisory Timeline

  • First published August 8, 2024 (795 days ago).
  • Last revised August 12, 2024 — 4 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update shopware/platform to 6.6.5.1 or later
composer require "shopware/platform:^6.6.5.1"
Composer
Update shopware/core to 6.6.5.1 or later
composer require "shopware/core:^6.6.5.1"
Composer
Update shopware/platform to 6.5.8.13 or later
composer require "shopware/platform:^6.5.8.13"
Composer
Update shopware/core to 6.5.8.13 or later
composer require "shopware/core:^6.5.8.13"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (4)

Affects 1 ecosystem: packagist (2).

PackageEcosystemAffectedFixed In
shopware/platform
packagist
v6.6.0.0, v6.6.0.1, v6.6.0.2, v6.6.0.3 (+9 more)6.6.5.1
shopware/core
packagist
v6.6.0.0, v6.6.0.1, v6.6.0.2, v6.6.0.3 (+9 more)6.6.5.1
shopware/platform
packagist
6.3.0.0, 6.3.0.1, 6.3.0.2, 6.3.1.0 (+108 more)6.5.8.13
shopware/core
packagist
6.3.0.0, 6.3.0.1, 6.3.0.2, 6.3.1.0 (+108 more)6.5.8.13

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.3 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L

Frequently Asked Questions

What is CVE-2024-42356?
Shopware vulnerable to Server Side Template Injection in Twig using Context functions This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.3/10).
How do I check if my project is affected by CVE-2024-42356?
CVE-2024-42356 affects shopware/platform and shopware/core. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-42356 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.3

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-35jp-8cgg-p4wj

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies