Server-Side Template Injection Affecting shopware/platform package, versions <6.5.8.13>=6.6.0.0, <6.6.5.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.08% (35th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PHP-SHOPWAREPLATFORM-7654170
  • published9 Aug 2024
  • disclosed8 Aug 2024
  • creditNgo Wei Lin

Introduced: 8 Aug 2024

CVE-2024-42356  (opens in a new tab)
CWE-1336  (opens in a new tab)

How to fix?

Upgrade shopware/platform to version 6.5.8.13, 6.6.5.1 or higher.

Overview

shopware/platform is a Shopware e-commerce core.

Affected versions of this package are vulnerable to Server-Side Template Injection by forcing a change in the context object using $context->scope. A user with access to administrator tools can invoke any statically callable PHP function by passing it as a parameter to the vulnerable Twig template.

PoC

$context->scope(Context::SYSTEM_SCOPE, static function (Context $context) use ($mediaService, $media, &$fileBlob): void {
    $fileBlob = $mediaService->loadFile($media->getId(), $context);
});

CVSS Scores

version 4.0
version 3.1