CVE-2022-4022 Cross-site scripting in SVG Support

Medium 6.4 Published Updated

Authenticated attackers can upload malicious SVG files to execute JavaScript in browsers, potentially leading to account takeover.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2022-4022?

CVE-2022-4022 is a medium-severity cross-site scripting vulnerability in benbodhi SVG Support, published on 16 Nov 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

The SVG Support plugin for WordPress defaults to insecure settings in version 2.5 and 2.5.1. SVG files containing malicious javascript are not sanitized. While version 2.5 adds the ability to sanitize image as they are uploaded, the plugin defaults to disable sanitization and does not restrict SVG upload to only administrators. This allows authenticated attackers, with author-level privileges and higher, to upload malicious SVG files that can be embedded in posts and pages by higher privileged users. Additionally, the embedded JavaScript is also triggered on visiting the image URL, which allows an attacker to execute malicious code in browsers visiting that URL.

Weakness: CWE-79

Which versions are affected by CVE-2022-4022?

It affects 1 product.

Products include Benbodhi Svg Support.

How do I fix CVE-2022-4022?

No fix has been published for CVE-2022-4022 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-4022 being exploited?

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

Sources

Also known as GHSA-mwcq-5rpw-7p42.

Is CVE-2022-4022 in your software?

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

Check your SBOMs for free