github shopware/shopware v6.7.16.1
Release v6.7.16.1

latest release: v6.6.10.32
2 hours ago

System requirements

  • tested on PHP 8.2, 8.4 and 8.5
  • tested on MySQL 8, MySQL 9.7, MariaDB 11 and MariaDB 12

Security Fixes

Improved API access protection

Fixed an API access-control vulnerability that could expose protected data.
API responses and Store API searches now consistently respect field visibility restrictions.
Validation errors with code FRAMEWORK__ACCESSOR_NOT_ALLOWED now use HTTP status 400 instead of 500.
Entity aggregations in the Admin API and in app scripts now also require the read privilege of the aggregated entity.

Association visibility is checked against the API scope of the caller.
This applies to Admin API and Store API requests, as well as app scripts using services.repository or services.store.
In 6.7, associations in the associations parameter that are not visible in that scope are ignored, including their nested criteria.
Selections in the fields parameter that traverse a non-visible association are also ignored; valid selections and fields added by server code are preserved.
If no field selections remain, the normal read behavior applies, with API response visibility still enforced.
With debug mode enabled, these requests emit a deprecation notice identifying the ignored association or field selection.
Starting with 6.8, these requests fail with HTTP 400 and FRAMEWORK__ACCESSOR_NOT_ALLOWED; remove non-visible associations and field selections that traverse them from requests and app scripts before upgrading.
Filters, sorting and aggregations retain their existing validation.
App permissions do not grant additional access to protected associations through services.store.

ExtensionAPI repository operations no longer expose Administration access tokens

Fixed an ExtensionAPI vulnerability that could expose the signed-in Administration user's access token to an app.
The save, saveAll, and delete repository operations no longer return raw HTTP responses.
Apps should await completion of these operations to detect success.

Clone overwrites enforce field protection and association permissions

The Admin API clone action and CloneBehavior validate explicit root, nested association, translation and extension overwrites using the caller's field write protection and create/update permissions.
Association overwrites remain supported, including partial payloads and null values that suppress copying.
Copied source values retain their existing clone behavior without requiring additional association write privileges.
Creating the root clone still requires create permission; updating an existing associated entity requires its update permission, while creating a new associated entity requires its create permission.

Recovery associations removed

Remove criteria using the user.recoveryUser or customer.recoveryCustomer associations, which were removed in a security update.
UserEntity::getRecoveryUser(), UserEntity::setRecoveryUser(), CustomerEntity::getRecoveryCustomer(), and CustomerEntity::setRecoveryCustomer() are deprecated and will be removed in 6.8.
The outgoing user_recovery.user and customer_recovery.customer associations remain available.

Extension XML files are parsed without resolving document types

App manifests, plugin config.xml files, custom entity, admin UI, flow, CMS and custom field XML files are now read through Shopware\Core\Framework\Util\XmlParser.
It rejects any document type declaration before libxml can load an external DTD or entity.
Previously the DTD was resolved before the document type was rejected, so an administrator who may upload extensions could read local files through a crafted manifest (XML external entity injection).

Empty, missing or malformed extension XML files now fail with a UtilException (UTIL__XML_PARSING_FAILED, HTTP 400) instead of Symfony's InvalidArgumentException.
The error messages are unchanged.
The PHPStan rule NoXmlUtilsParsingRule in the core rule set reports direct calls to XmlUtils::parse() and XmlUtils::loadFile() outside tests.
Use XmlParser for XML that may come from an extension.
XmlParser is public API, so extensions that parse XML from an untrusted source should use it instead of XmlUtils as well.

Twig templates only read the request context

Twig templates can no longer call methods that change the request context or the request, such as setters.
Reading them stays possible, for example context.languageId, and so does adding an extension with addExtension() or addArrayExtension().
Such a call fails with the error code FRAMEWORK__TWIG_METHOD_CALL_NOT_ALLOWED; make the change in PHP instead, for example in an event subscriber.

App Script services use a separate context for each call

The repository and writer App Script services now use their own context for every call.
Context changes made during one call no longer carry over to later calls.

Aggregation identifiers and JSON paths reject comment and quote characters

Aggregation names and range aggregation keys containing a single or double quote, the --, /*, or */ SQL comment markers, a backslash, or a semicolon are now rejected with a FRAMEWORK__INVALID_AGGREGATION_QUERY (HTTP 400), in addition to the previously rejected backtick, question mark, colon, and control characters.
JSON field access paths used in filters, sortings, and aggregations now reject the /* and */ SQL comment markers and control characters.
From 6.8.0.0 this fails as a FRAMEWORK__DBAL_INVALID_IDENTIFIER (HTTP 400); on 6.7 the same input is rejected with an InvalidArgumentException (HTTP 500).
Either way the request is blocked and no data is returned.
These characters could desynchronise PDO placeholder parsing from the database server under emulated prepares on PHP 8.2 and 8.3 leading to SQL Injection.

Store API criteria field paths are resolved per path segment

Field paths in Store API criteria (filters, sortings, and aggregations) are resolved per path segment.
A path that uses extensions as a whole segment keeps working;
a segment that only contains the text extensions is treated literally and rejected when it is not a real field.
Integrations that use valid field paths are unaffected.

Content Security Policy for Storefront documents

Storefront document responses now send a Content-Security-Policy header that blocks scripts, embedded documents, base URL changes and form submissions. Custom HTML document templates must work without these capabilities; styles and images remain permitted. Admin API and Store API responses retain their existing CSP.

The Storefront document policy can be overridden through the container parameter shopware.security.private_media_csp in config/services.yaml.

HTML files are no longer accepted as public media

html was removed from the default shopware.filesystem.allowed_extensions. Public media is served from the shop's own domain, so an uploaded HTML file ran its scripts in the same origin as the Administration and could read the session of an administrator who opened it.

HTML files are still accepted as private media, for example for accessible HTML documents. Uploads of HTML files to public media now fail with CONTENT__MEDIA_FILE_TYPE_NOT_SUPPORTED. HTML files that were uploaded to public media before this change are still served. Review them and delete the ones you do not need.

S3 and other object storages serve a file with the content type stored at upload time, not with the type of its extension. Uploads whose content is HTML, XHTML, SVG or another XML type are therefore rejected with CONTENT__MEDIA_INVALID_FILE unless the file extension belongs to that type. This applies to the regular and the presigned upload flow. For example, an HTML document uploaded as .jpg or an SVG uploaded as .png is no longer accepted.

If your shop needs HTML files as public media, add html to shopware.filesystem.allowed_extensions in your own configuration and serve these files from a separate domain or with a Content-Security-Policy: sandbox header.

Media visibility is immutable

The private field of media can now only be set when creating the media entity.
Updates that change its value are rejected because toggling the flag does not move the actual file or its thumbnails between the public and private filesystems.
Set the intended visibility during creation.
Updates that resend the existing value remain supported.

The DAL Immutable flag now correctly rejects changes to falsy values such as false, 0, and an empty string.

Media paths and file names are validated on API writes

Admin API and Sync API writes can no longer set media.path or media_thumbnail.path to a relative path or reset it to null.
These writes are rejected with 400 and CONTENT__MEDIA_ILLEGAL_PATH.
External media keep working with an absolute http or https URL.
The external media link action and the creation of external thumbnails reject URLs that are not a plain absolute http or https URL with a host.
media.fileName is validated like the file name of an upload and is rejected with CONTENT__MEDIA_ILLEGAL_FILE_NAME when it contains characters such as / or \.
Writing back the unchanged stored path or file name is still accepted.
To store a file in the shop's own storage, use the media upload actions or the presigned upload.

POST /api/_action/clone/{entity}/{id} validates path and fileName of media and path of media_thumbnail in overwrites, also inside nested associations and extensions.
path must be an absolute http or https URL, and fileName follows the rules of an upload file name.
Invalid values are rejected with 400 and FRAMEWORK__API_INVALID_CLONE_OVERWRITE.
This media check applies to the Admin API clone action only, not to EntityRepository::clone() called from code.

Media with an external URL are no longer attached to mails sent with mediaIds, because their stored path was read from the public filesystem.
A warning is logged for each skipped media.

The update does not rewrite values stored before it.
Check media.path and media_thumbnail.path for relative values that the configured path strategy does not produce, for example values containing .. or a backslash, or starting with /.
Correct such paths before deleting or replacing the affected media, because both act on the stored path.

User, access key and admin integration writes are restricted

A non-admin may only update or delete their own user and their own access keys through the Admin API.
Writes to other users or their access keys are rejected with 403 and USER__USER_CHANGE_NOT_ALLOWED.
A non-admin may no longer update or delete an admin integration; these writes are rejected with 403 and INTEGRATION__ADMIN_INTEGRATION_CHANGE_NOT_ALLOWED.
Administrators are unaffected.
The user of an access key can no longer be changed after the key was created, also not by administrators.

Presigned media upload endpoints now require ACL privileges

POST /api/_action/media/presign-upload and POST /api/_action/media/{mediaId}/finalize-upload now require the media:update privilege.
Preparing an upload without a mediaId, which creates a new media entity, additionally requires media:create.
Requests with tokens lacking a privilege receive a 403 with FRAMEWORK__MISSING_PRIVILEGE_ERROR.
Administration users are not affected: the "Media creator" permission already includes media:update.
Integrations and API clients with manually assigned privilege lists must add the respective privilege to their ACL role.
When finalize-upload fails for a new media, the media and the uploaded file are only removed if the caller also holds media:delete.
Otherwise the media stays without a file.

Integrations no longer act as the user named in sw-app-user-id

A standard integration that sends the sw-app-user-id header keeps its own identity.
The header only narrows its permissions to those of the named user.
Writes are no longer attributed to that user: created_by_id stays empty and updated_by_id keeps its previous value.
Naming an inactive or unknown user is rejected with a 403 and the error code FRAMEWORK__APP_USER_NOT_FOUND, and requests of a deactivated app are rejected as well.
An app integration still acts for the named user, except that an inactive user is now treated like a user without the required app privilege.

Routes that act on the signed-in Administration user now require a directly authenticated user and reject every integration, including an app that names a user, with a 403 and the error code FRAMEWORK__API_EXPECTED_USER.
To read a user, use GET /api/user/{id} with user:read.
To change a user, use PATCH /api/user/{id} with user:update.
That route requires an admin integration or a directly authenticated user, because a non-admin caller may only change its own user.

App files must be inside the App directory

Shopware now only reads App files that are located inside the App directory.
This applies to the App icon, the icons of payment methods, shipping methods and flow actions, and the scripts of rule conditions.
Files outside of the App directory are treated like a missing file, so the icon is skipped.
CMS blocks whose name leaves the cms/blocks directory of the App are rejected, so the App cannot be installed or updated.
Until 6.8, both CMS block errors are still thrown as the deprecated Shopware\Core\Framework\App\Exception\AppCmsExtensionException.
With 6.8 they are thrown as Shopware\Core\Framework\App\AppException.
Apps that keep their files inside their own directory are not affected.

Core

MCP servers run on mcp/sdk 0.9 and symfony/mcp-bundle 0.15

Shopware now requires mcp/sdk 0.9 and symfony/mcp-bundle 0.15.
Plugins and bundles that register MCP tools are affected in these points:

  • A tool that declares an outputSchema has its structuredContent validated against it.
    A result that does not match is sent as an error result with isError: true.
    Return new \stdClass() for an empty object, since [] is sent as an array.
  • A tool whose inputSchema has a properties member that is not an object, or a required member that is not a list, is rejected when it is registered.
  • #[CompletionProvider] no longer takes providerClass; pass the class to provider instead.

The SDK classes for an OAuth proxy, client registration and OIDC discovery were removed, see the mcp/sdk 0.9.0 changelog.
The MCP endpoints match the Origin header of browser clients exactly, including scheme and port.
They accept the origins of APP_URL and of every sales channel domain.
A loopback origin, for example the MCP Inspector on http://localhost:6274, is accepted only for a shop on a loopback host such as localhost or *.localhost.
Clients without an Origin header, such as CLI clients and desktop apps, are not affected.
Allow further origins with shopware.mcp.allowed_origins.
An entry is an exact origin, an origin with :* for any port, or * for any origin:

shopware:
    mcp:
        allowed_origins:
            - 'https://chat.example.com'
            - 'http://localhost:*'

The list can also come from an environment variable, for example allowed_origins: '%env(csv:MCP_ALLOWED_ORIGINS)%'.
A rejected origin is logged as a warning in the mcp channel.

What's Changed

Full Changelog: v6.7.16.0...v6.7.16.1

Get in touch

Discuss about decisions, bugs you might stumble upon, etc in our community discord. See you there ;)

Don't miss a new shopware release

NewReleases is sending notifications on new releases.