GHSA-7336-ghhp-f2qj: Shopware/shopware Remote Code Execution Vulnerability

CRITICAL
CVSS 9.8
CWE-74
Published
Advisory Summary

GHSA-7336-ghhp-f2qj is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Shopware/shopware libraries in the Packagist ecosystem. The issue involves shopware remote code execution vulnerability. Remediation is available by upgrading affected packages to version 5.2.16.

GHSA-7336-ghhp-f2qj at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-7336-ghhp-f2qj
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Shopware/shopware
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix GHSA-7336-ghhp-f2qj

To remediate this vulnerability, upgrade all affected Shopware/shopware dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

shopware/shopware fixed: 5.2.16
Upgrade shopware/shopware to 5.2.16
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for shopware/shopware

How to Check if You Are Affected

To determine whether your application is affected by GHSA-7336-ghhp-f2qj, inspect your project dependencies for Shopware/shopware:

inspect dependencies for shopware/shopware

Analyze the terminal output to locate any version of Shopware/shopware in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.2.16), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Shopware/shopware, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Under certain circumstances, it’s possible to execute an unauthorized foreign code in Shopware in versions prior to 5.2.16. One possible threat is if a template that doesn’t derive from the Shopware standard has been completely copied. Themes or plugins that execute or overwrite the following template code are vulnerable. - Affected file: emotion.tpl Path template file "Emotion template": templates / _default / frontend / forms / elements.tpl Path template file "Responsive template": themes/Frontend/Bare/frontend/forms/elements.tpl The complete line beginning with: `{eval var=$sSupport.sFields[$sKey]...` should be exchanged with the following: ``` {$sSupport.sFields[$sKey]|replace:'{literal}':''|replace:'{/literal}':''|replace:'%*%':"{s name='RequiredField' namespace='frontend/register/index'}{/s}"} ```

GHSA-7336-ghhp-f2qj Affected Shopware/shopware Versions

1 component(s)
Fixed Versions:
5.2.16
Product / Package Ecosystem Affected Versions Fixed Version
shopware/shopware
Packagist
≥ 5.2.15
< 5.2.16
All 1 versions
5.2.15
5.2.16

References

Frequently Asked Questions

What is GHSA-7336-ghhp-f2qj?
GHSA-7336-ghhp-f2qj is a security vulnerability in Shopware/shopware involving Shopware Remote Code Execution Vulnerability under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Shopware/shopware versions are affected?
Affected versions include releases prior to 5.2.16 across affected packages: shopware/shopware.
What version fixes GHSA-7336-ghhp-f2qj?
Upgrading to 5.2.16 (or the latest patched release for your respective branch) resolves the vulnerability.
Is shopware/shopware affected?
Yes, shopware/shopware is affected in releases prior to 5.2.16. Upgrade your dependency to 5.2.16 or later.
What is the CVSS score of GHSA-7336-ghhp-f2qj?
GHSA-7336-ghhp-f2qj has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with GHSA-7336-ghhp-f2qj?
GHSA-7336-ghhp-f2qj is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check Packagist dependencies for GHSA-7336-ghhp-f2qj?
Run the dependency tree command: 'inspect dependencies for shopware/shopware'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7336-ghhp-f2qj",
  "modified" : "2024-05-21T20:54:03Z",
  "published" : "2024-05-21T20:52:57Z",
  "aliases" : [ ],
  "summary" : "Shopware Remote Code Execution Vulnerability",
  "details" : "Under certain circumstances, it’s possible to execute an unauthorized foreign code in Shopware in versions prior to 5.2.16. One possible threat is if a template that doesn’t derive from the Shopware standard has been completely copied. Themes or plugins that execute or overwrite the following template code are vulnerable.\n\n- Affected file: emotion.tpl\n\nPath template file \"Emotion template\": templates / _default / frontend / forms / elements.tpl\nPath template file \"Responsive template\": themes/Frontend/Bare/frontend/forms/elements.tpl\n\nThe complete line beginning with: `{eval var=$sSupport.sFields[$sKey]...` should be exchanged with the following:\n\n```\n{$sSupport.sFields[$sKey]|replace:'{literal}':''|replace:'{/literal}':''|replace:'%*%':\"{s name='RequiredField' namespace='frontend/register/index'}{/s}\"}\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "shopware/shopware"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.2.15"
      }, {
        "fixed" : "5.2.16"
      } ]
    } ],
    "versions" : [ "5.2.15" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/shopware5/shopware/commit/6113d30a90e626154e438aa896e656c0f38694f3"
  }, {
    "type" : "WEB",
    "url" : "https://community.shopware.com/_detail_1989.html"
  }, {
    "type" : "WEB",
    "url" : "https://docs.shopware.com/en/shopware-5-en/security-updates/security-update-01-2017?category=shopware-5-en/security-updates"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/shopware/shopware/2017-01-25.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/shopware5/shopware"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-21T20:52:57Z",
    "nvd_published_at" : null
  }
}