CVE-2022-46873 Cross-site scripting in Firefox

High 8.8 Published Updated

An attacker can inject executable script into pages protected by Content Security Policy due to missing unsafe-hashes directive support in Firefox.

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-46873?

CVE-2022-46873 is a high-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

Because Firefox did not implement the <code>unsafe-hashes</code> CSP directive, an attacker who was able to inject markup into a page otherwise protected by a Content Security Policy may have been able to inject executable script. This would be severely constrained by the specified Content Security Policy of the document. This vulnerability affects Firefox < 108.

Weakness: CWE-74

Which versions are affected by CVE-2022-46873?

It affects 1 product.

Products include Mozilla Firefox.

How do I fix CVE-2022-46873?

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

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

All Mozilla Firefox vulnerabilities

Sources

Also known as GHSA-p5f8-m753-hvgf, UBUNTU-CVE-2022-46873.

Is CVE-2022-46873 in your software?

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

Check your SBOMs for free