TypiCMS Core has Stored Cross-Site Scripting (XSS) via SVG File Upload
TypiCMS Core
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| typicms/core Packagist |
|
|
TypiCMS Core
| Product | Affected | Fixed in |
|---|---|---|
| typicms/core Packagist |
|
|
13.0.912.0.5TypiCMS is a multilingual content management system based on the Laravel framework. A Stored Cross-Site Scripting (XSS) vulnerability exists in the file upload module of TypiCMS prior to version 16.1.7. The application allows users with file upload permissions to upload SVG files. While there is a MIME type validation, the content of the SVG file is not sanitized. An attacker can upload a specially crafted SVG file containing malicious JavaScript code. When another user (such as an administrator) views or accesses this file through the application, the script executes in their browser, leading to a compromise of that user's session. The issue is exacerbated by a bug in the SVG parsing logic, which can cause a 500 error if the uploaded SVG does not contain a `viewBox` attribute. However, this does not mitigate the XSS vulnerability, as an attacker can easily include a valid `viewBox` attribute in their malicious payload. Version 16.1.7 of TypiCMS Core fixes the issue.
From the CVE record · GitHub_M
TypiCMS Core does not sanitize uploaded SVG content in its file upload module. A user with file upload permission can upload an SVG containing JavaScript that executes when another user views it through the application, potentially compromising that user's session.
Teams running the Packagist package typicms/core should check versions >=16.0.0 <16.1.7, >=15.0.0 <15.0.29, >=14.0.0 <14.0.27, >=13.0.0 <13.0.9, or <12.0.5.