8.7high
Possible cross-site scripting attack via unsanitized SVG files in FoF Upload
- Severity
- 8.7high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.26% (higher than 70% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-fm53-mpmp-7qw2
Description
FriendsofFlarum (FoF) Upload is an extension that handles file uploads intelligently for your forum. If FoF Upload prior to version 1.2.3 is configured to allow the uploading of SVG files ('image/svg+xml'), navigating directly to an SVG file URI could execute arbitrary Javascript code decided by an attacker. This Javascript code could include the execution of HTTP web requests to Flarum, or any other web service. This could allow data to be leaked by an authenticated Flarum user, or, possibly, for data to be modified maliciously. This issue has been patched with v1.2.3, which now sanitizes uploaded SVG files. As a workaround, remove the ability for users to upload SVG files through FoF Upload.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| FriendsOfFlarum upload | < 1.2.3, before 1.2.3 | CVE List, NVD |
| fof/upload (Packagist) | before 1.2.3 | GitHub Advisory Database |
All scores
| GitHub_M | 8.7high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N |
| GitHub | 8.7high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N |
| NVD | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| NVD | 3.5low CVSS:2.0 | AV:N/AC:M/Au:S/C:N/I:P/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
FriendsofFlarum (FoF) Upload is an extension that handles file uploads intelligently for your forum. If FoF Upload prior to version 1.2.3 is configured to allow the uploading of SVG files ('image/svg+xml'), navigating directly to an SVG file URI could execute arbitrary Javascript code decided by an attacker. This Javascript code could include the execution of HTTP web requests to Flarum, or any other web service. This could allow data to be leaked by an authenticated Flarum user, or, possibly, for data to be modified maliciously. This issue has been patched with v1.2.3, which now sanitizes uploaded SVG files. As a workaround, remove the ability for users to upload SVG files through FoF Upload.
GitHub Advisory Database
Impact
If FoF Upload is configured to allow the uploading of SVG files (image/svg+xml), navigating directly to an SVG file URI could execute arbitrary Javascript code decided by an attacker.
This Javascript code could include the execution of HTTP web requests to Flarum, or any other web service. This could allow data to be leaked by an authenticated Flarum user, or, possibly, for data to be modified maliciously.
Patches
This has been patched with v1.2.3, which now sanitizes uploaded SVG files.
Workarounds
Upgrade to 1.2.3 (requires Flarum 1.2 or later), or remove the ability for users to upload SVG files through FoF Upload.
References
Thank you to Safwat Refaat for the responsible disclosure of this vulnerability.
NVD (es)
FriendsofFlarum (FoF) Upload es una extensión que maneja las subidas de archivos de forma inteligente para su foro. Si FoF Upload versiones anteriores a 1.2.3, está configurado para permitir la subida de archivos SVG ("image/svg+xml"), la navegación directa a un URI de archivo SVG podría ejecutar código Javascript arbitrario decidido por un atacante. Este código Javascript podría incluir la ejecución de peticiones web HTTP a Flarum, o a cualquier otro servicio web. Esto podría permitir la filtración de datos por parte de un usuario autenticado de Flarum, o, posiblemente, la modificación de datos de forma maliciosa. Este problema ha sido parcheado con la versión v1.2.3, que ahora sanea los archivos SVG cargados. Como mitigación , elimine la posibilidad de que los usuarios suban archivos SVG mediante FoF Upload
References
| https://github.com/FriendsOfFlarum/upload/security/advisories/GHSA-fm53-mpmp-7qw2 | third-party-advisory, web | |
| https://github.com/FriendsOfFlarum/upload/issues/68 | exploit, issue-tracking, third-party-advisory, web | |
| https://github.com/FriendsOfFlarum/upload/pull/318 | patch, third-party-advisory, web | |
| https://github.com/FriendsOfFlarum/upload/releases/tag/1.2.3 | patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-30999 | advisory | |
| https://github.com/FriendsOfFlarum/upload | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-30999 changed 2025-04-22 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-fm53-mpmp-7qw2 changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2022-30999 changed 2026-06-17 | Public domain |