CVE-2025-51541 Cross-site scripting in n/a

Medium 6.1 Published Updated

An unauthenticated attacker can inject persistent JavaScript into the Shopware 6 installation interface via CSRF, leading to client-side code execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2025-51541?

CVE-2025-51541 is a medium-severity cross-site scripting vulnerability in Shopware Shopware, published on 5 Aug 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

A stored cross-site scripting (XSS) vulnerability exists in the Shopware 6 installation interface at /recovery/install/database-configuration/. The c_database_schema field fails to properly sanitize user-supplied input before rendering it in the browser, allowing an attacker to inject malicious JavaScript. This vulnerability can be exploited via a Cross-Site Request Forgery (CSRF) attack due to the absence of CSRF protections on the POST request. An unauthenticated remote attacker can craft a malicious web page that, when visited by a victim, stores the payload persistently in the installation configuration. As a result, the payload executes whenever any user subsequently accesses the vulnerable installation page, leading to persistent client-side code execution.

Weakness: CWE-79

Which versions are affected by CVE-2025-51541?

It affects 1 product.

Products include Shopware Shopware.

How do I fix CVE-2025-51541?

No fix has been published for CVE-2025-51541 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2025-51541 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-51541 exists.

All Shopware Shopware vulnerabilities

Sources

Also known as GHSA-mh52-5xcm-mhfr.

Is CVE-2025-51541 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free