CVE-2025-31693 AI (Artificial Intelligence) - Moderately critical - Gadget Chain - SA-CONTRIB-2025-022

Medium 6.6 Published Updated

Attackers can execute arbitrary OS commands via the Drupal AI module, requiring an upgrade to the latest version.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-31693?

CVE-2025-31693 is a medium-severity command injection vulnerability in Drupal AI (Artificial Intelligence), published on 31 Mar 2025. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') vulnerability in Drupal AI (Artificial Intelligence) allows OS Command Injection.This issue affects AI (Artificial Intelligence): from 0.0.0 before 1.0.5.

Weakness: CWE-78

Which versions are affected by CVE-2025-31693?

2 open source packages ship an affected version, including drupal/ai. It affects 1 product.

PackageAffectedFixed in
drupal/ai PackagistAll versions1.0.5
drupal/ai PackagistAll versions1.0.5
Linux distribution packages (1)
drupal/ai Packagist:https://packages.drupal.org/8All versions1.0.5

Products include Artificial Intelligence Project Artificial Intelligence.

How do I fix CVE-2025-31693?

Upgrade drupal/ai to 1.0.5 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2025-31693 being exploited?

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

Sources

Also known as DRUPAL-CONTRIB-2025-022, GHSA-vx9m-rfxq-gr74.

Is CVE-2025-31693 in your software?

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

Check your SBOMs for free