Junglewise Threat Intelligence

Shopware sensitive file exposure via incorrect web root configuration

Severity: medium · CVSS 5.3 · Published 2021-04-13

Technologies: Shopware, shopware/shopware (Packagist). Vendors: Shopware, Packagist.

Executive brief

Shopware is an e-commerce platform used to power online stores. A configuration issue can allow sensitive system files, such as the .env file containing database credentials and API keys, to be accessed by unauthorized users over the internet. This could lead to a full compromise of the store's data and customer information.

Technical details

A vulnerability classified as CWE-552 (Files or Directories Accessible to External Parties) exists in Shopware. If the web server is misconfigured to use the project root instead of the recommended '/public' directory as the document root, sensitive files like '.env' become accessible via direct HTTP requests. An unauthenticated remote attacker can exploit this to leak environment variables, including database credentials and application secrets. The issue is addressed in version 6.3.5.3, and a security plugin is available for older versions (6.1 and 6.2).

Affected products

  • Shopware shopware/production <= 6.3.5.2
  • Shopware shopware/shopware <= 6.3.5.2

Timeline

  • 2021-04-12: disclosed
  • 2021-04-12: patched: Version 6.3.5.3 released
  • 2021-04-13: advisory

References

Related threats