CVE-2025-13981 AI (Artificial Intelligence) - Moderately critical - Cross-Site Scripting - SA-CONTRIB-2025-119

Medium 4.4 Published Updated

An attacker can inject malicious scripts into the Drupal AI module, potentially executing code in victim browsers.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-13981?

CVE-2025-13981 is a medium-severity cross-site scripting vulnerability in Drupal AI (Artificial Intelligence), published on 28 Jan 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

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): from 0.0.0 before 1.0.7, from 1.1.0 before 1.1.7, from 1.2.0 before 1.2.4.

Weakness: CWE-79

Which versions are affected by CVE-2025-13981?

It affects 1 product.

Linux distribution packages (1)
drupal/ai Packagist:https://packages.drupal.org/8All versions1.0.7, 1.1.7, 1.2.4

Products include Artificial Intelligence Project Artificial Intelligence.

How do I fix CVE-2025-13981?

Upgrade to a fixed version.

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-2025-13981 being exploited?

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

Sources

Also known as DRUPAL-CONTRIB-2025-119, GHSA-3p56-grmc-2fxh.

Is CVE-2025-13981 in your software?

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

Check your SBOMs for free