{"id":"CVE-2026-48015","aliases":["GHSA-xvhc-gm7j-mhmc"],"url":"https://o3.security/vulnerability/CVE-2026-48015","summary":"Shopware: Stored XSS via SVG file upload — no SVG sanitization","details":"SVG files are in the `allowed_extensions` whitelist and can be uploaded by any admin user via the media manager. There is zero SVG content sanitization anywhere in the upload pipeline. A malicious SVG with JavaScript (`onload`, `<script>`, `<foreignObject>`) executes in the context of the Shopware domain when accessed.\n\n## The Problem\n\nIn `src/Core/Framework/Resources/config/packages/shopware.yaml`, line 194:\n\n```yaml\nallowed_extensions: [\"jpg\", \"jpeg\", \"png\", \"webp\", \"avif\", \"gif\", \"svg\", ...]\n```\n\nSVG is whitelisted. The upload path (`MediaUploadController` → `FileSaver` → `TypeDetector`) recognizes SVG as `ImageType` with `VECTOR_GRAPHIC` flag, but no code strips JavaScript, event handlers, or external entity references from the SVG XML.\n\nA search of the entire codebase for SVG sanitization returns — no `DOMPurify`, no `svg-sanitize`, no `strip_tags` on SVG content, nothing.\n\n## Impact\n\nStored XSS affecting all users who view the uploaded SVG. In an e-commerce context, this can lead to admin account takeover, customer data theft, or malicious plugin installation.\n\n## Suggested Fix\n\nEither:\n\n1. **Remove SVG from `allowed_extensions`** if SVG upload is not a core requirement\n2. **Sanitize SVG content** on upload using a library like `enshrined/svg-sanitize` (strips scripts, event handlers, external references)\n3. **Serve SVGs with `Content-Disposition: attachment`** to prevent inline rendering\n4. **Serve SVGs from a separate domain** (like Nextcloud's `usercontent.apps.nextcloud.com`)\n\nOption 2 is the most practical — `enshrined/svg-sanitize` is already used by WordPress and other PHP projects.\n\nRegards & BG,\nKeyvan Hardani","published":"2026-07-17T17:53:01.695Z","modified":"2026-08-12T03:51:14.392369535Z","cvss":{"score":4.9,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N"},"epss":{"score":0.00485,"percentile":0.40676,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"shopware/core","fixedVersion":"6.7.10.1"},{"ecosystem":"Packagist","name":"shopware/core","fixedVersion":"6.6.10.18"},{"ecosystem":"Packagist","name":"shopware/platform","fixedVersion":"6.7.10.1"},{"ecosystem":"Packagist","name":"shopware/platform","fixedVersion":"6.6.10.18"}],"fix":{"url":"https://github.com/shopware/shopware/commit/745a3ea3b77d4fe0f78c595ef527d8453a134497","label":"shopware/shopware@745a3ea"},"references":[{"type":"WEB","url":"https://github.com/shopware/shopware/releases/tag/v6.6.10.18"},{"type":"WEB","url":"https://github.com/shopware/shopware/releases/tag/v6.7.10.1"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/48xxx/CVE-2026-48015.json"},{"type":"ADVISORY","url":"https://github.com/shopware/shopware/security/advisories/GHSA-xvhc-gm7j-mhmc"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48015"},{"type":"FIX","url":"https://github.com/shopware/shopware/commit/745a3ea3b77d4fe0f78c595ef527d8453a134497"},{"type":"FIX","url":"https://github.com/shopware/shopware/commit/fd6d39bdb62dfa06fe62c7c87b37607d84094cda"},{"type":"PACKAGE","url":"https://github.com/shopware/shopware"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:14.392369535Z"}}