CVE-2023-22731CWE-94

Improper Control of Generation of Code in Twig rendered views in shopware

Critical · published January 17, 2023

CVSS v3.1
10.0
EPSS
1%
Percentile
70.9
In the wild
Unconfirmed
What it is

🚨 A single missing Sandbox extension is like leaving a door wide open — it lets attackers call any PHP function they want, potentially leading to full code execution! 🔥 Think of your Twig environment as a restaurant kitchen, where every chef can access any ingredient. Without the Sandbox, it’s as if they can cook whatever they wish, including secret recipes that could ruin the meal — or the entire restaurant! An attacker gaining access to this environment could execute arbitrary PHP code, effectively taking control of the application. This could lead to devastating consequences, such as data theft, site defacement, or even total compromise of the server. The implications are absolutely catastrophic!

Put simply

Think of your Twig environment as a restaurant kitchen, where every chef can access any ingredient. Without the Sandbox, it’s as if they can cook whatever they wish, including secret recipes that could ruin the meal — or the entire restaurant! This vulnerability allows unauthorized execution of PHP functions within Twig templates, as it bypasses necessary security checks when the Sandbox extension is not activated. This means any user with Twig access can call any global PHP function, leading to potential remote code execution.

What to do

An attacker gaining access to this environment could execute arbitrary PHP code, effectively taking control of the application. This could lead to devastating consequences, such as data theft, site defacement, or even total compromise of the server. The implications are absolutely catastrophic! Upgrade Shopware to version 6.4.18.1 or later immediately to secure your installation. For versions 6.1, 6.2, and 6.3, apply the provided plugin fix to mitigate this risk. Don’t wait — secure your environment now! You’ve got this! By following these steps, you’ll be on your way to shoring up your defenses and keeping your site safe! 🛡️

The record
Technical detail
CVSS v3.1
10.0 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01333 · 70.9th percentile
Weakness
CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2023-01-17T21:31Z
EPSS history
Timeline
  • 17 JAN 21:31Z
    Improper Control of Generation of Code in Twig rendered views in shopware
    cvelistv5