Skip to main content
HDWSec
High GHSA-p67w-3mq7-rw2g

Shopware 6: Path Traversal via media.fileExtension leading to Remote Code Execution

Severity
High
CVSS score
8.0CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
CVE number(s)
GHSA-p67w-3mq7-rw2g
Vendor
Shopware
Product
Shopware 6 (shopware/core, shopware/platform - media update)
Affected version(s)
6.7.1.0 through 6.7.13.0
Fixed version(s)
6.7.13.1
Vulnerability type
Path Traversal (CWE-22) and Unrestricted Upload of File with Dangerous Type (CWE-434) leading to Code Injection (CWE-94)
Researchers
Jean-Jamil KHALIFÉ

Presentation

Shopware stores uploaded media under a managed directory, deriving the file name and extension from the media record. The fileExtension field of that record is writable through the Admin API.

HDW Sec found that Shopware does not sufficiently validate the extension on a media update, so an administration user holding the single media:update privilege can write files outside the media directory and reach remote code execution.

Issue(s)

  • media.fileExtension is writable and is not validated against an allow-list on update, so it can carry traversal sequences and a dangerous extension.
  • The value is used to build the destination path, which lets the write land outside the intended media directory.
  • Where the resulting file is served by the PHP interpreter, this turns into arbitrary PHP execution and full compromise of the shop.
  • The privilege required is narrow: media:update alone is enough, which is a privilege routinely granted to content roles and integrations rather than to administrators only.
  • The vendor’s workaround is to restrict media:update to fully trusted users and integrations.

References

  • GitHub advisory: GHSA-p67w-3mq7-rw2g
  • Fixed in Shopware 6.7.13.1, published 2026-08-25. No CVE assigned as of publication.

Our R&D hunts for vulnerabilities.

Zero-day research, reverse engineering, coordinated disclosure: discover our R&D team.