CVE-2017-6927 Drupal cross-site scripting vulnerability

Medium 6.1 Published Updated

An XSS vulnerability in Drupal's JavaScript escaping function allows attackers to inject malicious HTML, potentially leading to code execution or account takeover.

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

CVE-2017-6927 is a medium-severity cross-site scripting vulnerability in Debian Debian Linux, published on 1 Mar 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

Drupal 8.4.x versions before 8.4.5 and Drupal 7.x versions before 7.57 has a Drupal.checkPlain() JavaScript function which is used to escape potentially dangerous text before outputting it to HTML (as JavaScript output does not typically go through Twig autoescaping). This function does not correctly handle all methods of injecting malicious HTML, leading to a cross-site scripting vulnerability under certain circumstances. The PHP functions which Drupal provides for HTML escaping are not affected.

Weakness: CWE-79

Which versions are affected by CVE-2017-6927?

8 open source packages ship an affected version, including drupal/core and drupal/drupal. It affects 2 products.

PackageAffectedFixed in
drupal/core PackagistFrom 7.07.57
drupal/core PackagistFrom 7.07.57
drupal/core PackagistFrom 8.4.08.4.5
drupal/core PackagistFrom 8.4.08.4.5
drupal/drupal PackagistFrom 7.07.57
drupal/drupal PackagistFrom 7.07.57
2 more packages
drupal/drupal PackagistFrom 8.4.08.4.5
drupal/drupal PackagistFrom 8.4.08.4.5

Products include Debian Debian Linux, Drupal Drupal.

How do I fix CVE-2017-6927?

Upgrade drupal/core to a fixed version for your release line: 7.57 or 8.4.5.

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

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

All Debian Debian Linux vulnerabilities

Sources

Also known as GHSA-585j-5449-mf5m, UBUNTU-CVE-2017-6927.

Is CVE-2017-6927 in your software?

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

Check your SBOMs for free