CVE-2022-34475 Cross-site scripting in Firefox

Medium 6.1 Published Updated

Attacker can execute scripts via SVG use tags in Firefox if HTML Sanitizer API is used, requiring same-origin JS file reference.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-34475?

CVE-2022-34475 is a medium-severity cross-site scripting vulnerability in Mozilla Firefox, published on 22 Dec 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

SVG <code>&lt;use&gt;</code> tags that referenced a same-origin document could have resulted in script execution if attacker input was sanitized via the HTML Sanitizer API. This would have required the attacker to reference a same-origin JavaScript file containing the script to be executed. This vulnerability affects Firefox < 102.

Weakness: CWE-79

Which versions are affected by CVE-2022-34475?

It affects 1 product.

Products include Mozilla Firefox.

How do I fix CVE-2022-34475?

Upgrade to a fixed version.

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-34475 being exploited?

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

All Mozilla Firefox vulnerabilities

Sources

Also known as GHSA-h5xc-q687-w54m, UBUNTU-CVE-2022-34475.

Is CVE-2022-34475 in your software?

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

Check your SBOMs for free