CVE-2025-31696 RapiDoc OAS Field Formatter - Moderately critical - Cross site scripting - SA-CONTRIB-2025-025

Medium 6.1 Published Updated

An attacker can inject malicious scripts into web pages via the RapiDoc OAS Field Formatter module, potentially compromising user sessions.

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

What is CVE-2025-31696?

CVE-2025-31696 is a medium-severity cross-site scripting vulnerability in Drupal RapiDoc OAS Field Formatter, published on 31 Mar 2025. An attacker can exploit it over the internet without logging in, 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 RapiDoc OAS Field Formatter allows Cross-Site Scripting (XSS).This issue affects RapiDoc OAS Field Formatter: from 0.0.0 before 1.0.1.

Weakness: CWE-79

Which versions are affected by CVE-2025-31696?

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

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

Products include Chapterthree Rapidoc Oas Field Formatter.

How do I fix CVE-2025-31696?

Upgrade drupal/rapidoc_elements_field_formatter to 1.0.1 or later.

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-31696 being exploited?

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

Sources

Also known as DRUPAL-CONTRIB-2025-025, GHSA-86h4-w859-3hhv.

Is CVE-2025-31696 in your software?

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

Check your SBOMs for free