Shopware: Stored XSS via SVG file upload — no SVG sanitization
shopware · shopware platform
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| shopware/core Packagist |
|
|
| shopware/platform Packagist |
|
shopware · shopware platform
| Product | Affected | Fixed in |
|---|---|---|
| shopware/core Packagist |
|
|
| shopware/platform Packagist |
|
|
Shopware is an open commerce platform. Prior to 6.6.10.18 and 6.7.10.1, SVG files are in the allowed_extensions whitelist in src/Core/Framework/Resources/config/packages/shopware.yaml and can be uploaded via the media manager without SVG content sanitization in the upload pipeline from MediaUploadController to FileSaver to TypeDetector, allowing malicious SVG JavaScript such as onload, <script>, and <foreignObject> to execute in the Shopware domain when the uploaded SVG is viewed. This issue is fixed in versions 6.6.10.18 and 6.7.10.1.
From the CVE record · GitHub_M
Shopware allows SVG files to be uploaded through the media manager without sanitizing their contents. An attacker who can upload a malicious SVG can cause JavaScript to run in the Shopware domain when someone views the file.
Teams running affected versions of the Packagist packages shopware/core or shopware/platform before 6.6.10.18 or in the 6.7 series before 6.7.10.1 should check their installations.