# CVE-2018-9861: DRUPAL-CORE-2018-003 - CKEditor, a third-party JavaScript library included in Drupal core, has [fixed a cross-site scripting (XSS) vulnerability](https://ckeditor.

Source: https://junglewise.ai/threats/cve-2018-9861-ckeditor-enhanced-image-plugin-cross-site-scripting-in-img-element  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2018-04-18. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2018-9861 · Severity: low · CVSS 3 · Published 2018-04-18

CKEditor's Enhanced Image plugin is used to display and manage images within a rich text editor. An attacker can inject malicious scripts through specially crafted image elements, which would execute in the browser of any user viewing the content, potentially allowing account takeover or data theft from authenticated users.

Technologies: [Drupal](https://junglewise.ai/threats/technologies/drupal), [drupal/core (Packagist)](https://junglewise.ai/threats/technologies/packagist-drupal-core). Vendors: [Drupal](https://junglewise.ai/threats/vendors/drupal), [Packagist](https://junglewise.ai/threats/vendors/packagist).

## Quick answers

**Is CVE-2018-9861 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2018-9861 being exploited in the wild.

**How severe is CVE-2018-9861?** Low severity, with a CVSS score of 3, published 18 April 2018.

**Which products and versions are affected?** Drupal 8.0 through 8.4.6, 8.5.0 through 8.5.1; drupal/core (Packagist) ECOSYSTEM:introduced=8.0.0,fixed=8.4.7|ECOSYSTEM:introduced=8.5.0,fixed=8.5.2.

**Is there a fix for CVE-2018-9861?** Yes. drupal/core (Packagist): upgrade to 8.4.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2018-9861 attacked?** It is attacked over the network.

**Am I affected by CVE-2018-9861?** Check whether you run Drupal or drupal/core (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- drupal/core (Packagist): upgrade to 8.4.7 or later

  ```sh
  composer require drupal/core:^8.4.7
  ```


## Technical details

The vulnerability is a stored/reflected cross-site scripting (XSS) flaw in the Enhanced Image (image2) plugin for CKEditor versions 4.5.10 through 4.9.1. The plugin fails to properly sanitize or validate IMG element attributes, allowing remote attackers to inject arbitrary JavaScript that executes in the context of a viewer's browser. No authentication is required to craft a malicious image element, though the attacker must have a way to inject it into the editor or saved content. The vulnerability was patched in CKEditor 4.9.2 and in Drupal 8.4.7 and 8.5.2, which bundle CKEditor.

## Affected products

- CKEditor CKEditor 4.5.10 through 4.9.1
- Drupal Drupal 8.0 through 8.4.6, 8.5.0 through 8.5.1

## Identifiers

- CVE-2018-9861
- DRUPAL-CORE-2018-003
- GHSA-g78h-pf65-46rv

## Timeline

- 2018-04-19: disclosed: CVE-2018-9861 published
- 2018-04-18: patched: Drupal 8.4.7 and 8.5.2 released with fix
- 2022-05-14: advisory: GHSA-g78h-pf65-46rv published

## References

- [https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/core/CVE-2018-9861.yaml](https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/core/CVE-2018-9861.yaml)

## Related threats

- [Drupal core Link module cross-site scripting in markup sanitization](https://junglewise.ai/threats/cve-2026-108515-drupal-core-2026-015-the-drupal-core-link-module-provides-a)
- [Drupal Navigation module cross-site scripting in attributes](https://junglewise.ai/threats/cve-2026-108514-drupal-core-2026-016-the-navigation-module-doesn-t-sufficiently)
- [Drupal Core remote code execution in Field UI module](https://junglewise.ai/threats/cve-2026-108097-drupal-core-2026-014-a-remote-code-execution-vulnerability)
- [Drupal cross-site scripting in CKEditor WYSIWYG](https://junglewise.ai/threats/drupal-core-2026-013-the-drupal-project-uses-the-ckeditor-https-github-f5b3da40)
- [Drupal stored cross-site scripting in Layout Builder](https://junglewise.ai/threats/cve-2026-55805-drupal-stored-cross-site-scripting-in-layout-builder)
