CVE-2025-31675 Drupal core - Moderately critical - Cross Site Scripting - SA-CORE-2025-004
Drupal core contains a cross-site scripting vulnerability allowing attackers to inject malicious scripts, potentially leading to session hijacking or code execution.
- 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-31675?
CVE-2025-31675 is a medium-severity cross-site scripting vulnerability in Drupal Drupal, published on 31 Mar 2025. 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 Drupal core allows Cross-Site Scripting (XSS).This issue affects Drupal core: from 8.0.0 before 10.3.14, from 10.4.0 before 10.4.5, from 11.0.0 before 11.0.13, from 11.1.0 before 11.1.5. It also affects the Drupal 7 module from versions 7.x-1.0 through 7.x-1.12.
Weakness: CWE-79
Which versions are affected by CVE-2025-31675?
10 open source packages ship an affected version, including drupal/core and drupal. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
drupal/core Packagist | From 10.4.0 | 10.4.5 |
drupal/core Packagist | From 10.4.0 | 10.4.5 |
drupal/core Packagist | From 11.0.0 | 11.0.13 |
drupal/core Packagist | From 11.0.0 | 11.0.13 |
drupal/core Packagist | From 11.1.0 | 11.1.5 |
drupal/core Packagist | From 11.1.0 | 11.1.5 |
4 more packages
drupal/core Packagist | From 8.0.0 | 10.3.14, 10.4.5, 11.0.13, 11.1.5 |
drupal/core Packagist | From 8.0.0 | 10.3.14 |
drupal/core Packagist | From 8.0.0 | 10.3.14 |
drupal Bitnami | From 8.0.0 | 10.4.5, 11.1.5 |
Products include Drupal Drupal.
How do I fix CVE-2025-31675?
Upgrade drupal/core to a fixed version for your release line: 10.4.5, 11.0.13, 11.1.5 or 10.3.14.
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-31675 being exploited?
There is no known exploitation of CVE-2025-31675 in the wild and no public exploit code.
Other vulnerabilities in Drupal Drupal
Sources
Also known as BIT-drupal-2025-31675, CLSA-2026-1788972447, DRUPAL-CORE-2025-004, GHSA-m4wj-hhwj-47qp.