CVE-2022-30999
JSON

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 packageVersionsReported by
FriendsOfFlarum upload< 1.2.3, before 1.2.3CVE List, NVD
fof/upload (Packagist)before 1.2.3GitHub Advisory Database

All scores

GitHub_M8.7high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
GitHub8.7high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
NVD5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
NVD3.5low CVSS:2.0AV:N/AC:M/Au:S/C:N/I:P/A:N

Classification

CWE-79

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

Sources

SourceRecordLicence
CVE ListCVE-2022-30999 changed 2025-04-22CVE Terms of Use
GitHub Advisory DatabaseGHSA-fm53-mpmp-7qw2 changed 2023-11-08CC-BY-4.0
NVDCVE-2022-30999 changed 2026-06-17Public domain