Miggo Logo

GHSA-6wh5-mw9h-5c3w: Shopware vulnerable to path traversal via Plugin upload

2.7

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
Published
10/21/2025
Updated
10/21/2025
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
shopware/platformcomposer>= 6.7.0.0, < 6.7.3.16.7.3.1
shopware/platformcomposer< 6.6.10.76.6.10.7
shopware/corecomposer>= 6.7.0.0, < 6.7.3.16.7.3.1
shopware/corecomposer< 6.6.10.76.6.10.7

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is a classic path traversal issue within the plugin upload functionality of Shopware. The root cause lies in the Shopware\Core\Framework\Plugin\PluginExtractor::validatePluginZip function. When validating the contents of an uploaded ZIP archive, the code iterated through the files starting from the third file (index 2), neglecting to check the first two. This oversight allowed an authenticated admin user to craft a malicious ZIP file where the second entry contained path traversal sequences (../).

When the Shopware\Core\Framework\Plugin\PluginManagementService::uploadPlugin or extractPluginZip methods are called, they use the PluginExtractor (renamed to ExtensionExtractor in the patch) to handle the file extraction. The extract method in the extractor calls the flawed validatePluginZip method. Because the validation was skipped for the initial files in the archive, the extractTo operation would proceed to write a file to a directory outside of the intended plugin directory, leading to arbitrary file write. This could be leveraged by an attacker to upload a PHP webshell and achieve remote code execution on the server.

The patch addresses the vulnerability by changing the loop in validatePluginZip to start from the first file (index 0), ensuring all files within the archive are checked for path traversal characters.

Vulnerable functions

Shopware\Core\Framework\Plugin\PluginExtractor::validatePluginZip
src/Core/Framework/Plugin/PluginExtractor.php
This private function contains the core logic of the vulnerability. It was responsible for validating the contents of a plugin ZIP file. The loop iterating over the files in the archive started at index 2, completely skipping the first two files. This allowed a malicious actor to place a file with path traversal characters (`../`) in the second entry (index 1) of the ZIP archive, which would not be validated. This allowed writing files to arbitrary locations on the filesystem.
Shopware\Core\Framework\Plugin\PluginExtractor::extract
src/Core/Framework/Plugin/PluginExtractor.php
This function orchestrates the extraction of the plugin ZIP file. It calls the vulnerable `validatePluginZip` method. An attacker exploiting the vulnerability would have this function in the call stack. The class was renamed to `ExtensionExtractor` in the patch, but the vulnerability existed under the name `PluginExtractor`.
Shopware\Core\Framework\Plugin\PluginManagementService::uploadPlugin
src/Core/Framework/Plugin/PluginManagementService.php
This is a high-level service function that handles the plugin upload process. It takes the uploaded file and passes it to the extraction process, which contains the vulnerability. This function is a likely entry point for the exploitation of the vulnerability, as it's called when a user uploads a plugin.
Shopware\Core\Framework\Plugin\PluginManagementService::extractPluginZip
src/Core/Framework/Plugin/PluginManagementService.php
This function is called during the plugin upload process and is responsible for calling the vulnerable extraction logic in `PluginExtractor::extract` (which was renamed to `ExtensionExtractor::extract` in the patch).

WAF Protection Rules

WAF Rule

### Imp**t M*li*ious **tors **n *xploit t*is vuln*r**ility to writ* *il*s wit*in *r*itr*ry *ir**tori*s on t** *il*syst*m o* t** S*opw*r* w** *ont*in*r. T*is *oul* *llow t**m to **in p*rsist*nt s**ll ****ss *y uplo**in* * P*P-s**ll *il* to *n ****ssi*

Reasoning

T** vuln*r**ility is * *l*ssi* p*t* tr*v*rs*l issu* wit*in t** plu*in uplo** *un*tion*lity o* S*opw*r*. T** root **us* li*s in t** `S*opw*r*\*or*\*r*m*work\Plu*in\Plu*in*xtr**tor::v*li**t*Plu*inZip` *un*tion. W**n v*li**tin* t** *ont*nts o* *n uplo**