Aller au contenu principal
HDWSec
High GHSA-p67w-3mq7-rw2g

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

Sévérité
High
Score CVSS
8.0CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
Identifiants CVE
GHSA-p67w-3mq7-rw2g
Éditeur
Shopware
Produit
Shopware 6 (shopware/core, shopware/platform - media update)
Versions affectées
6.7.1.0 through 6.7.13.0
Version corrigée
6.7.13.1
Type de vulnérabilité
Path Traversal (CWE-22) and Unrestricted Upload of File with Dangerous Type (CWE-434) leading to Code Injection (CWE-94)
Chercheurs
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.

Notre R&D traque les vulnérabilités.

Recherche de 0-day, reverse engineering, divulgation coordonnée : découvrez notre pôle R&D.