---
id: "CVE-2026-118545"
kind: "vulnerability"
aliases: ["CVE-2026-118545"]
title: "Drupal AI module: cross-site scripting lets attackers run scripts in pages"
severity: "medium"
cvss: null
epss: null
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "drupal/ai", "fixed": ["1.4.11", "1.5.2"], "affected": "< 1.4.11, >= 1.5.0 < 1.5.2", "ecosystem": "packagist"}]
ecosystems: []
tags: ["ai-tooling", "cms", "drupal", "drupal-ai", "php"]
not_affected_if: ["no-html-text-formats", "unaffected-version"]
published_at: "2026-10-30T04:18:19+00:00"
first_seen_at: "2026-10-30T04:28:38+00:00"
updated_at: "2026-10-30T04:30:54+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-118545", "first_seen_at": "2026-10-30T04:28:38+00:00"}, {"source": "analyst", "url": null, "first_seen_at": "2026-10-30T04:30:54+00:00"}]
---

# Drupal AI module: cross-site scripting lets attackers run scripts in pages

The Drupal AI module does not sufficiently restrict HTML rendering, so cross-site scripting is possible under certain conditions. The attacker must have access to a text format that can render HTML. Fixed in AI 1.4.11 and 1.5.2.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- packagist:drupal/ai affected < 1.4.11, >= 1.5.0 < 1.5.2 fixed 1.4.11, 1.5.2

## How to check

Run 'composer show drupal/ai' or 'drush pm:list --filter=ai'. You are exposed if the version is below 1.4.11 on the 1.4 branch, below 1.5.2 on 1.5, or on any 1.3.x or older release. The attacker needs access to a text format that can render HTML, so also review which roles can use such formats.

## Fix

Upgrade the Drupal AI module: 1.5.x to 1.5.2, 1.4.x to 1.4.11. Sites on 1.3.x (unsupported) must move to 1.4.11 or 1.5.2. For example: composer require drupal/ai:^1.5.2 then drush updb && drush cr.

## Timeline

- 2026-10-30T04:28:38+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-118545
- 2026-10-30T04:30:54+00:00 analyst — Drupal SA-CONTRIB-2026-266 (moderately critical 14/25, 2026-10-28) read directly; fix is AI 1.4.11 or 1.5.2; 1.3.x unsupported. Needs a text format that renders HTML. Advisory says 'Theoretical' exploit; no exploitation or PoC found. Same release fixes 7 sibling AI SAs (267-273). Advisory range reads <1.4.11 and >=1.5.0 <1.5.2, so NVD's 'to 1.4.11' looks like an inclusive-boundary slip. Severity medium matches the vendor's 'moderately critical' rating.

## Documents

- [advisory] SA-CONTRIB-2026-266 AI (Artificial Intelligence) - Cross-site scripting https://www.drupal.org/sa-contrib-2026-266

## From the sources

Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting") vulnerability in Drupal AI (Artificial Intelligence) allows Cross-Site Scripting (XSS). This issue affects AI (Artificial Intelligence) versions: from 0.0.0 to 1.4.11, from 1.5.0 to 1.5.2.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
