Community Hub membersJoin more than 6500+ Members
All security advisories
HighCVSS 8.0– Published

Path traversal via writable media.fileExtension leads to remote code execution (single media:update privilege)

GHSA-p67w-3mq7-rw2g

Affected versions

PackageAffected versionsFixed in
shopware/core>= 6.7.1.0, <6.7.13.16.7.13.1
shopware/platform>= 6.7.1.0, <6.7.13.16.7.13.1

Fixed by the Security Plugin

If you cannot update Shopware right away, the Shopware Security Plugin closes this issue from the listed version on.

Shopware versionSecurity Plugin version
6.7.x4.0.13 or newer

Description

Impact

Shopware did not sufficiently validate a media file extension during a media update. An authenticated Administration user with the media:update privilege could use this to write files outside the intended media directory.

In affected configurations, this could lead to arbitrary PHP code execution and full compromise of the shop.

Affected versions
  • Shopware 6.7.1.0 through 6.7.13.0
Patches

The issue is fixed in:

  • 6.7.13.1

We recommend updating to a patched version as soon as possible.

Workarounds

If an immediate update is not possible, restrict the media:update privilege to fully trusted users and integrations. Review accounts and integrations that hold this privilege, and remove it where it is not required.

Credits

Thanks to @HDWSec for responsibly reporting this issue.