Skip to main content

CVE-2023-22731 — Vulnerability in shopware/platform — CVE Details

CRITICAL

Shopware vulnerable to Improper Control of Generation of Code in Twig rendered views

Published January 17, 2023Updated November 8, 2023Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (1.58%). Schedule for your next planned update.

Does your project use an affected shopware/platform version?

Paste your composer.lock to check it for CVE-2023-22731 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my composer.lock

Summary

Impact

In Twig environment without the Sandbox extension, it is possible to refer to PHP functions in twig filters like map, filter, sort. This allows in the template to call any global PHP function.

Patches

The problem has been fixed with 6.4.18.1 with an override of the specified filters until the integration of the Sandbox extension has been finished.

Workarounds

For older versions of 6.1, 6.2, and 6.3, corresponding security measures are also available via a plugin. For the full range of functions, we recommend updating to the latest Shopware version.

References

https://docs.shopware.com/en/shopware-6-en/security-updates/security-update-01-2023?category=security-updates

Advisory Timeline

  • First published January 17, 2023 (1408 days ago).
  • Last revised November 8, 2023 — 294 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

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

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: Packagist (2).

PackageFixed In
shopware/platform Packagist · Affected: 6.3.0.0, 6.3.0.1, 6.3.0.2, 6.3.1.0 (+65 more)6.4.18.1
shopware/core Packagist · Affected: 6.3.0.0, 6.3.0.1, 6.3.0.2, 6.3.1.0 (+65 more)6.4.18.1

Vulnerability Classification

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

CVSS Score Breakdown

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

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

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

Frequently Asked Questions

What is CVE-2023-22731?
Shopware vulnerable to Improper Control of Generation of Code in Twig rendered views. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2023-22731?
CVE-2023-22731 affects shopware/platform and shopware/core. It has a 1.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2023-22731 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
1.58%
EPSS percentile: 75.9

This places it in the top quartile of EPSS-scored vulnerabilities — 75.9% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.

Also Known As

GHSA-93cw-f5jj-x85w

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock