Community Security Guard for Shopware 5: Open-Source Hardening for Shopware 5 Shops

Since 31 July 2024, Shopware 5 no longer receives security updates. Many shops keep running anyway, often for years. That is why HQ GmbH initiated the Community Security Guard for Shopware 5: a plugin that specifically blocks known, documented attack vectors in Shopware 5.6.10, 5.7.19 and 5.7.20 and thus complements a shop’s other protective measures. It is an independent open-source project initiated and currently maintained by HQ GmbH, open to community contributions. The plugin is free of charge, licensed under GPL-3.0 and works without modifying Shopware core files.

Key facts at a glance (as of 23 November 2026):

  • Current version 0.1.6 of 23 November 2026, free of charge, licence GPL-3.0-only.
  • Compatible with Shopware 5.7.19 and 5.7.20 on PHP 8.1 and 8.2 and with Shopware 5.6.10 on PHP 7.4.
  • Three modules: HTTP security headers, a template guard against known vulnerabilities in the bundled Smarty 3.1.12, and upload hardening against executable files and disguised PHAR archives.
  • The template guard covers seven documented Smarty vulnerabilities (CVEs) by rejecting the triggering constructs when content is saved.
  • Every change is tested automatically against real Shopware 5.6.10, 5.7.19 and 5.7.20 installations.
  • An independent open-source project initiated and currently maintained by HQ GmbH, open to community contributions. Free of charge, not a commercial product and not a product of shopware AG.

Source code, releases and documentation

Why we initiated the project

Shopware 5 reached its end of life on 31 July 2024. Since then, no vendor update closes new vulnerabilities in the Shopware core or the bundled libraries. The bundled template engine Smarty 3.1.12 is particularly critical: several vulnerabilities are documented for it through which content from email templates, newsletters or text snippets can escalate to code execution on the server.

We have been supporting Shopware shops since around 2009 and know the situation of many operators: the migration to Shopware 6 is planned, but the shop has to keep running until then. Instead of securing these vulnerabilities only in individual client projects, we make the protective measures available to all Shopware 5 operators as open source. The source code is open, every change is traceable, and external contributions are welcome.

What the plugin does today

HTTP security headers

The plugin sets X-Content-Type-Options, X-Frame-Options and Referrer-Policy, optionally Strict-Transport-Security (HSTS, only over HTTPS). Headers already set by Shopware, the theme or other plugins are not overwritten.

Template guard against known Smarty vulnerabilities

Shopware 5 evaluates a lot of database content as Smarty templates. When content is saved, the template guard rejects constructs with known vulnerabilities in the bundled Smarty 3.1.12, such as {extends}, {fetch}, {php}, invalid {function} and {block} names or access to static classes.

  • Checked content: email templates, newsletters, document elements, SEO URL templates, email headers and footers, “essential features”, notes for payment methods and countries, product exports, text snippets (including CSV import) and the shopping world element “HTML code”, each including translations.
  • Save paths: checked in the backend and additionally via Doctrine, which is also used by the REST API and other plugins.
  • Existing content: the console command sw5cs:template-guard:scan checks content that is already stored, read-only. It reports location, field and rule, never the content.

Upload hardening

The plugin rejects uploaded files that a web server could execute as PHP, for example .phar, .php7 or .pht, also as a double extension such as image.phar.jpg. Files containing a PHAR archive are rejected as well, even if disguised as an image. This applies to the media manager, ESD files, imports and all other uploads. The plugin installer is excluded.

Logging and messages

Rejected templates and files are logged with location, field and rule or file extension. Content, file names, user names and IP addresses are not logged. All messages are available as text snippets in German and English and can be adjusted in the backend. Every module can be disabled individually.

Compatibility

ShopwarePHPSupported
5.7.19 and 5.7.208.1 and 8.2yes, tested
5.6.107.4yes, tested (since 0.1.6)
5.6.0 to 5.6.9, 5.7.0 to 5.7.18, 5.5 and older–no

Note on Shopware 5.6: the modules also run on Shopware 5.6.10. Updating to Shopware 5.7.20 is still recommended. Shopware 5.6 runs on PHP 7.4 at most, which has not received security updates since November 2022. Shopware 5.6.10 from May 2021 was the last 5.6 release, and security fixes from later Shopware versions are missing from the 5.6 core. No plugin can compensate for these risks.

Which Smarty vulnerabilities the template guard covers

Smarty 3.1.12 is within the affected version range of all of the following advisories. “Covered” means: the template guard rejects the triggering construct when saving, and the scan reports it in stored content. The vulnerability in the Smarty code itself remains and can only be fixed in the Shopware core.

CVEConstructCoverage by the template guard
CVE-2024-35226{extends} attributecovered since 0.1.2 ({extends} is always rejected)
CVE-2021-26120{function} namecovered since 0.1.2
CVE-2022-29221{block} name, file name{block} names since 0.1.2; file names in {include} since 0.1.3 (only with strict checking, on by default)
CVE-2021-26119$smarty.template_objectcovered since 0.1.2
CVE-2021-29454{math}covered since 0.1.3 (only with strict checking, on by default)
CVE-2026-62993{fetch} (SSRF)covered since 0.1.2 ({fetch} is always rejected)
CVE-2021-21408access to static classescovered since 0.1.4 (every :: in a Smarty tag is rejected)
CVE-2026-62992symlinks from trusted directoriesnot covered; concerns file access via symlinks in the file system, not template content
CVE-2023-28447escape:'javascript'not by the template guard; planned for 0.1.7

Source: ROADMAP.md, section 2.1, checked against the GitHub Advisory Database on 22 November 2026.

What the plugin does not do

A plugin cannot turn Shopware 5 into a supported system. It specifically blocks known, documented attack vectors. The following remains outside its reach:

  • Vulnerabilities in the Smarty code itself: the template guard prevents the triggering constructs from being saved. The vulnerabilities themselves can only be fixed by changing the core.
  • Bundled Composer libraries: for the runtime dependencies of Shopware 5.7.20, composer audit reports 38 security advisories, for example for Guzzle and Symfony 4.4. These can only be fixed in the core. A separate project to make the Shopware 5.7 core compatible with PHP 8.3 and 8.4 is in preparation for this.
  • PHP and servers: vulnerabilities in PHP can only be closed by a PHP update from the operator or hosting provider. Security updates for PHP 8.2 end on 31 December 2026.
  • Unknown vulnerabilities: the plugin does not protect against new or not yet documented vulnerabilities.

Regular updates of PHP, server and plugins as well as an individual security review remain important alongside it.

How the plugin is tested

  • Automated tests on every change: unit and integration tests against real standard installations of Shopware 5.7.19 and 5.7.20 with PHP 8.1 and 8.2 and Shopware 5.6.10 with PHP 7.4. Every fix gets a regression test.
  • Static analysis: PHPStan at the highest level with strict rules, run separately against Shopware 5.6.10 and 5.7. The Shopware core itself uses level 8.
  • Code style: according to the rules of the Shopware core.
  • Dependencies: composer audit runs on every change.
  • No exploit code: the tests use harmless input that only checks whether a protective measure takes effect.

Principles, protection layers and security decisions are described in the project’s architecture documentation.

Limits of testing: tests run against standard installations. Real shops almost always differ: public sources mention around 2,000 plugins for Shopware 5, plus themes and custom code. This results in millions to billions of possible combinations, which cannot all be tested. The plugin is therefore designed to be minimally invasive: no changes to core files, no template overrides, every module can be disabled individually. Always test in a staging environment with your own plugins and theme and create a current backup before using it in a live shop.

Download and installation

Option A: ZIP in the plugin manager

  1. Download the current release ZIP from Releases.
  2. In the Shopware backend, open “Settings → Plugin Manager → Installed”.
  3. Choose “Upload plugin”, select the ZIP file and activate the plugin.
  4. Clear the shop cache.

Option B: Composer

  1. Allow the Composer plugin used for installation: composer config allow-plugins.composer/installers true
  2. As long as the package is not yet on Packagist, add the repository as a package source: composer config repositories.sw5-community-security vcs https://github.com/HQ-GmbH/Sw5CommunitySecurity
  3. Install: composer require hqgmbh/sw5-community-security
  4. Activate: bin/console sw:plugin:refresh, then bin/console sw:plugin:install --activate Sw5CommunitySecurity and bin/console sw:cache:clear

Before activating, bin/console sw5cs:template-guard:scan shows which stored templates the template guard would reject.

Roadmap

The roadmap describes goals, not promised features or dates.

VersionGoal
0.1.7Safe JavaScript escaping in Smarty templates
0.1.8Content Security Policy, starting in report-only mode
0.1.9Checking allowed hosts and proxy headers
0.2.xSecurity check in the backend with recommendations
0.3.0Two-factor authentication for backend accounts

Separately, a dedicated project is in preparation to make the Shopware 5.7 core compatible with PHP 8.3 and 8.4. Details are in the ROADMAP.md.

Who is behind the project

The Community Security Guard for Shopware 5 is an independent open-source project initiated and currently maintained by HQ GmbH, open to community contributions. HQ GmbH has been working with Shopware since around 2009, back then on Shopware 3. It started the project, designed the architecture and security concept, developed the first versions including tests and CI, and is currently the maintainer: it maintains the project and is responsible for releases. External contributions are explicitly welcome.

Project lead and maintainer is Mathias Goldhan, founder and managing director of HQ GmbH. On GitHub he is active as hqgmbh; the repository is part of the HQ-GmbH organisation.

Contributing and reporting vulnerabilities

  • Contributing: bug reports, improvements and code are welcome. The rules are in CONTRIBUTING.md. Contributions are submitted with a Developer Certificate of Origin (DCO) sign-off.
  • Questions and bugs: via GitHub issues. Please never include credentials, customer data or other personal data.
  • Vulnerabilities: please do not report them publicly, but confidentially as described in SECURITY.md, preferably via GitHub’s private vulnerability reporting.

The plugin is provided free of charge under the GNU General Public License v3.0 (GPL-3.0-only) and is not a commercial product. There is no entitlement to support, response times or warranty. The full liability notes are in the project README. The project is not a product or service of shopware AG and is neither endorsed nor certified by it. “Shopware” is a registered trademark of shopware AG and is used solely to describe compatibility.

Frequently asked questions about the Community Security Guard

What does the Community Security Guard for Shopware 5 cost?

Nothing. The plugin is open source under the GPL-3.0 licence and available free of charge on GitHub.

Which versions does the plugin work with?

With Shopware 5.7.19 and 5.7.20 on PHP 8.1 and 8.2 and, since version 0.1.6, with Shopware 5.6.10 on PHP 7.4. Every version is tested automatically against these combinations. For Shopware 5.6 we still recommend updating to 5.7.20.

Does the plugin make my Shopware 5 shop secure?

No plugin can promise that. It specifically blocks known, documented attack vectors, such as seven Smarty vulnerabilities, and thus complements the other protective measures. Vulnerabilities in bundled libraries, in PHP or unknown vulnerabilities remain outside its reach.

Does the plugin modify Shopware core files?

No. It works exclusively via Shopware events and services, does not modify core files and does not override templates. Every module can be disabled individually.

Who is behind the project?

It is an independent open-source project initiated and currently maintained by HQ GmbH, open to community contributions. It is free of charge and not a commercial product. It is not a product of shopware AG, and shopware AG does not endorse or certify the project.

How do I report a vulnerability?

Confidentially as described in the project’s SECURITY.md, preferably via GitHub’s private vulnerability reporting, not via public issues.

Support for Shopware 5 shops

The plugin is a free open-source project without any entitlement to support. Separately, HQ GmbH offers support for Shopware 5 shops as a service: server and PHP updates, adaptation of plugins and interfaces, and 24/7 emergency support. More on our page Shopware 5 support & maintenance. If you are planning the switch, you will find the process under Shopware migration.

Mathias Goldhan

Founder, Managing Director, IT Architect & IT Consultant
SaaS Pioneer, Enterprise Architecture & Cluster Expert

Mathias Goldhan laid the foundation for today’s digital agency in 1994 and has been leading HQ GmbH strategically and operationally since 2005. With more than three decades of experience in software development and systems architecture, he advises medium-sized businesses and brands on the digitalization of business-critical processes. He is the strategic mind behind HQ GmbH’s positioning among the Top 100 owner-managed digital agencies (iBusiness/BVDW).

As a recognized SaaS pioneer and specialist in high-performance hosting, he designs highly available cluster infrastructures and leads the technical rescue of stalled large-scale e-commerce projects. He contributes his expertise in resilient systems and API-based B2B automation internationally between the company’s headquarters in Thuringia and its branch in Spain.

View full author profile & e-commerce expertise
Mathias Goldhan - Founder, Managing Director, IT Architect & IT Consultant at HQ GmbH
↑