Three weeks after the last security update, Shopware followed up on 16 September. 6.7.14.1 brings no new features. It closes five security vulnerabilities, one of which Shopware rates as critical (CVSS 9.6) and two as high. For the 6.6 line, 6.6.10.25 was released at the same time, closing the same five issues. According to the five security advisories Shopware has published, all versions prior to 6.6.10.25 are affected, including 6.5 and older. Patched versions are only available for 6.6 and 6.7.
The difference from August: this time, the vulnerabilities with the highest rating require an account in the Administration area. Only two of the five issues are reachable without being logged in. One concerns the newsletter sign-up alone. The other is more serious: via the Store API, the interface through which the Storefront and headless frontends retrieve their data, database queries could be altered so that other parties' data could be read. However, this only works with a specific combination of PHP version and database setting. What this means for your shop is explained below under “Does this affect me?”.
What you should check before the update
-
Apps and connected systems that use webhooks
Webhooks are automatic notifications that Shopware sends to other systems on certain events. Four events are no longer reported: the request for a new password for administrators and for customers, as well as the two mail events before sending and after creating a message. All four remain available in the Flow Builder. According to Shopware, apps that react to one of these events can still be installed and updated up to 6.8, but will receive a notice that this will no longer be possible from 6.8. In addition, three values are now missing from the data that other notifications carry along: the customer session identifier at login, the confirmation link for double opt-in, and the link for the newsletter sign-up. Anyone who has processed these values in a connected system will have to make changes.
-
Tools that duplicate users or integrations
Users and integrations can no longer be duplicated via the Admin API. Such calls receive a 403 error.
-
Headless frontends with custom evaluations
On request, the Store API returns evaluations alongside a query, which Shopware calls aggregations, for example counts per filter value. The names of such evaluations and the labels of value ranges within them may no longer contain a backtick, question mark, colon or control characters. Such requests are rejected with a 400 error.
-
Newsletter integrations
If double opt-in is configured, a sign-up only becomes active after confirmation. Integrations that have previously activated recipients directly via the Store API should no longer exhibit this behaviour after the update.
The critical vulnerability
-
Webhooks revealed more than the recipient was permitted to see – critical, CVSS 9.6
Shopware did not consistently check with webhooks whether the person who set up the notification was even permitted to see the event's data. A user or integration with the permission to create webhooks could thereby obtain customer, order and email data, as well as data from flows in the shop, that exceeded their own permissions. According to Shopware, in some cases this also included details that can be used to reset passwords, which could enable further account takeovers. Webhooks are now checked against the permissions of their creator, the owner and permissions of a webhook can no longer be changed without authorisation, and the events and values mentioned above no longer go to webhooks at all. According to Shopware, the issue was found internally.
The other four vulnerabilities
-
Database readable via the Store API – high, CVSS 8.6
A Store API call without authentication could, via insufficiently checked evaluations (aggregations), alter database queries so that arbitrary data could be read from the database; the technical term for this is SQL injection. According to Shopware, the prerequisite is a PHP version prior to 8.4 together with a setting of the PHP database driver in which PHP assembles the queries itself rather than having them prepared by the database. According to Shopware, write access could not be demonstrated. In August, Shopware had already closed a similar vulnerability at the same location. In our assessment, this is a second variant of it.
-
From restricted user to administrator – high, CVSS 8.1
Anyone permitted to log in to the Administration area and edit their own profile could, when saving the profile, include details that are actually protected, and thereby make themselves an administrator. A permission to edit other users was not required for this. The profile now only accepts a reference to a medium in the profile picture field; anything else is rejected with a 403 error.
-
Administrator permissions when duplicating users – medium, CVSS 6.5
A logged-in user with the permission to create users could include protected details when duplicating a user and thereby obtain administrator permissions. According to Shopware, this can also affect other records that can be duplicated. The duplication of users and integrations via the Admin API has therefore been disabled.
-
Newsletter sign-up without confirmation – medium, CVSS 5.3
With double opt-in enabled, a Store API call without authentication could activate a newsletter subscription without the owner of the email address having consented, including for addresses of existing customers. According to Shopware, the issue affects consent and the quality of the recipient list, not accounts or customer data.
Does this affect me?
-
All shops
According to Shopware, all versions prior to 6.6.10.25 and 6.7.0.0 up to and including 6.7.14.0 are affected. Patched are 6.7.14.1 and 6.6.10.25.
-
Exploitable without authentication
The database queries via the Store API, provided the shop runs on PHP prior to 8.4 and the mentioned database driver setting is active. Since it is active by default in PHP, the prerequisite should, in our assessment, be met on many installations running PHP 8.2 or 8.3. In addition, the newsletter sign-up without confirmation.
-
Only exploitable with an account
The critical webhook vulnerability requires a user or integration with the permission to create webhooks; the other two issues require an account in the Administration area. The risk here lies with employee accounts with restricted roles, with third-party integrations, and with access credentials that have already been leaked at some point.
-
6.5 line and older
According to Shopware, these versions are also affected. There is no patched version for them; Shopware only names 6.6.10.25 and 6.7.14.1. Whether the Shopware Security Plugin already covers the five issues is not clear from the release notes.
If you cannot update immediately
In the security advisories, Shopware lists interim measures. They do not replace the update but reduce the attack surface:
-
Restrict the permission to create webhooks to trustworthy administrators and integrations, review the existing webhooks and remove unexpected entries.
-
Switch to PHP 8.4 or disable the mentioned database driver setting. You will find the technical name in the developer section below.
-
Remove the permission to edit one's own profile and the permission to create users from roles that do not need them; review administrator accounts and logs for unexpected permission changes.
-
Temporarily disable the public newsletter sign-up.
For developers and connected systems
-
Webhooks
user.recovery.request, customer.recovery.request, mail.before.send and mail.after.create.message are no longer delivered and have been removed from the generated reference of webhook events. An event opts out of delivery with the attribute #[Shopware\Core\Framework\Webhook\NotHookable]. From the payload, contextToken is dropped for checkout.customer.login, confirmUrl for checkout.customer.double_opt_in_registration and checkout.customer.double_opt_in_guest_order, as well as url for newsletter.register. In mail templates, {{ contextToken }}, {{ confirmUrl }} and {{ url }} continue to work. A value is kept out of webhook payloads with [EventDataCollection::HIDDEN_FROM_WEBHOOK => true] as the options argument of EventDataCollection::add(). From 6.8, Shopware rejects app manifests that subscribe to one of the four events.
-
Store API and database
According to the advisory, the SQL injection only takes effect with PHP < 8.4 with
PDO::ATTR_EMULATE_PREPARES enabled. Remedy without an update: set PHP 8.4 or PDO::ATTR_EMULATE_PREPARES to false.
-
Aggregations
Aggregation names and keys of range aggregations with a backtick, question mark, colon or control characters are rejected with
400 and FRAMEWORK__INVALID_AGGREGATION_QUERY.
-
Profile
PATCH /api/_info/me now only accepts avatarMedia as {"id": ""}; any other form is rejected with 403 and FRAMEWORK__MISSING_PRIVILEGE_ERROR.
-
Cloning
POST /api/_action/clone/user/{id} and POST /api/_action/clone/integration/{id} respond with 403.
-
Confirmation hashes
The customer registration hash is no longer included in API responses and in customer payloads of webhooks. The internal confirmation flow is unchanged.
-
Deprecation
EventDataCollection will be declared final with Shopware 6.8.
Our recommendation:
Following August, this is the second security round within three weeks, and anyone who has not yet applied the first should now go straight to 6.7.14.1, as this version contains both. For everyone else, this is an update for the next maintenance window, not for next month. The deciding factor is the Store API vulnerability: it requires no login, and its August predecessor was, in our observation, quickly and deliberately exploited. The procedure remains the familiar one: first apply it in the staging environment, rebuild the cache and index, then click through checkout, customer registration with double opt-in, and the connected systems. This time it is particularly important to take a look at the list of webhooks and the user roles. Three of the five issues revolve around permissions that were granted too generously, and this can be cleaned up independently of the update.
Comments
No comments yet.
Write a comment