CVE-2017-7840 Cross-site scripting in Firefox

Medium 6.1 Published Updated

Attackers can inject JavaScript into exported bookmark files, leading to script execution when opened, requiring user interaction for social engineering.

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-2017-7840?

CVE-2017-7840 is a medium-severity cross-site scripting vulnerability in Mozilla Firefox, published on 11 Jun 2018. 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

JavaScript can be injected into an exported bookmarks file by placing JavaScript code into user-supplied tags in saved bookmarks. If the resulting exported HTML file is later opened in a browser this JavaScript will be executed. This could be used in social engineering and self-cross-site-scripting (self-XSS) attacks if users were convinced to add malicious tags to bookmarks, export them, and then open the resulting file. This vulnerability affects Firefox < 57.

Weakness: CWE-79

Which versions are affected by CVE-2017-7840?

It affects 1 product.

Products include Mozilla Firefox.

How do I fix CVE-2017-7840?

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-2017-7840 being exploited?

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

All Mozilla Firefox vulnerabilities

Sources

Also known as GHSA-gx4h-qpc9-477w, UBUNTU-CVE-2017-7840.

Is CVE-2017-7840 in your software?

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

Check your SBOMs for free