Possible cross-site scripting attack via unsanitized SVG files in FoF Upload
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | fof/upload | < 1.2.3 | 1.2.3 |
References
- https://github.com/FriendsOfFlarum/upload/security/advisories/GHSA-fm53-mpmp-7qw2
- https://nvd.nist.gov/vuln/detail/CVE-2022-30999
- https://github.com/FriendsOfFlarum/upload/issues/68
- https://github.com/FriendsOfFlarum/upload/pull/318
- https://github.com/FriendsOfFlarum/upload
- https://github.com/FriendsOfFlarum/upload/releases/tag/1.2.3
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N- Weakness (CWE)
CWE-79- Platform
- Composer
- Package
fof/upload- Disclosed
- 25.05.2022
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-fm53-mpmp-7qw2 - CC BY 4.0
Vulnerability history: fof/upload
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.