CVE-2022-22116 Directus - Stored Cross-Site Scripting (XSS) via SVG File Upload

Medium 5.4 Published Updated

A low-privileged attacker can inject arbitrary JavaScript via SVG uploads, leading to code execution in victims' browsers.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2022-22116?

CVE-2022-22116 is a medium-severity cross-site scripting vulnerability in directus, published on 10 Jan 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

In Directus, versions 9.0.0-alpha.4 through 9.4.1 are vulnerable to stored Cross-Site Scripting (XSS) vulnerability via SVG file upload in media upload functionality. A low privileged attacker can inject arbitrary javascript code which will be executed in a victim’s browser when they open the image URL.

Weakness: CWE-79

Which versions are affected by CVE-2022-22116?

It affects 1 product.

Products include Rangerstudio Directus.

How do I fix CVE-2022-22116?

No fix has been published for CVE-2022-22116 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2022-22116 being exploited?

There is no known exploitation of CVE-2022-22116 in the wild and no public exploit code.

Sources

Also known as GHSA-x3w2-c49h-w7x4.

Is CVE-2022-22116 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free