CVE-2017-6927 · drupal
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 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.
Published 2018-03-01, last changed 2026-06-17. Weakness: CWE-79.
How to fix
Upgrade to a fixed version: drupal/core 7.57, 8.4.5 (Packagist); drupal/drupal 7.57, 8.4.5 (Packagist) (each is the fix for its own release line). For the version that clears every advisory for your installed version, ask an agent for get_remediation.
Where the flaw is in the code
Fixed in drupal/drupal by bc929eb17c, 3347ff5697. Functions changed by the fix: httpData, checkPlain. Regression tests: modules/file/tests/file.test, modules/file/tests/file_module_test.module, modules/simpletest/tests/common.test, modules/simpletest/tests/common_test.module. Confidence: verified (a record names this commit as the fix, and it changed these functions).
Timeline
| 2018-03-01 | Published |
| 2022-05-14 | Package advisory GHSA-585j-5449-mf5m |
| 2026-06-17 | Record last changed |
| 2026-11-30 | EPSS when our history starts: 1.61% |
| 2026-12-03 | Code-level analysis added |
Affected packages
| Advisory | Package | Fixed in |
|---|---|---|
| GHSA-585j-5449-mf5m | drupal/core (Packagist) | 8.4.5 |
| GHSA-585j-5449-mf5m | drupal/core (Packagist) | 7.57 |
| GHSA-585j-5449-mf5m | drupal/drupal (Packagist) | 8.4.5 |
| GHSA-585j-5449-mf5m | drupal/drupal (Packagist) | 7.57 |
Also known as: GHSA-585j-5449-mf5m
Related
| CVE | Published | CVSS | Summary |
|---|---|---|---|
| CVE-2026-136716 KEV | 2026-11-26 | 9.8 | Drupal core - Highly critical - Access bypass - SA-CORE-2026-019 |
| CVE-2026-132166 | 2026-11-26 | 6.6 | Drupal core - Moderately critical - Gadget chain - SA-CORE-2026-018 |
| CVE-2026-132165 KEV | 2026-11-26 | 9.8 | Drupal core - Highly critical - Remote code execution - SA-CORE-2026-017 |
| CVE-2026-108515 | 2026-10-30 | 6.5 | Drupal core - Moderately critical - Cross-site scripting - SA-CORE-2026-015 |
| CVE-2026-108514 | 2026-10-30 | 6.5 | Drupal core - Moderately critical - Cross-site scripting - SA-CORE-2026-016 |
| CVE-2026-108097 | 2026-10-30 | 8.1 | Drupal core - Critical - Remote code execution - SA-CORE-2026-014 |
| CVE-2026-55805 | 2026-08-25 | 5.4 | Drupal core - Moderately critical - Cross-site scripting - SA-CORE-2026-012 |
| CVE-2026-15917 | 2026-08-25 | 4.7 | Drupal core - Moderately critical - Cross-site scripting - SA-CORE-2026-011 |
Add it to your agent
One command for Claude Code; setup for Claude Desktop, Cursor and others. No signup or key.
claude mcp add --transport http keygraph-cve https://cve-mcp.keygraph.io/mcp
Then ask for triage_cve CVE-2017-6927, or call /api/v1/vulnerabilities/CVE-2017-6927. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.