CVE-2020-15138 Cross-Site Scripting in Prism

High 7.1 Published Updated

Attackers can execute arbitrary code in Safari and Internet Explorer via XSS in the Prism Previewers plugin easing preview.

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-2020-15138?

CVE-2020-15138 is a high-severity cross-site scripting vulnerability in PrismJS prism, published on 7 Aug 2020. 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

Prism is vulnerable to Cross-Site Scripting. The easing preview of the Previewers plugin has an XSS vulnerability that allows attackers to execute arbitrary code in Safari and Internet Explorer. This impacts all Safari and Internet Explorer users of Prism >=v1.1.0 that use the _Previewers_ plugin (>=v1.10.0) or the _Previewer: Easing_ plugin (v1.1.0 to v1.9.0). This problem is fixed in version 1.21.0. To workaround the issue without upgrading, disable the easing preview on all impacted code blocks. You need Prism v1.10.0 or newer to apply this workaround.

Weakness: CWE-79

Which versions are affected by CVE-2020-15138?

2 open source packages ship an affected version, including prismjs. It affects 1 product.

PackageAffectedFixed in
prismjs npmFrom 1.1.01.21.0
prismjs npmFrom 1.1.01.21.0

Products include Prismjs Previewers.

How do I fix CVE-2020-15138?

Upgrade prismjs to 1.21.0 or later.

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-2020-15138 being exploited?

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

Sources

Also known as DEBIAN-CVE-2020-15138, GHSA-wvhm-4hhf-97x9, ROOT-APP-NPM-CVE-2020-15138, UBUNTU-CVE-2020-15138.

Is CVE-2020-15138 in your software?

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

Check your SBOMs for free