CVE-2026-40986 Spring Web Flow JS RemotingHandler renders non-HTML Response as HTML

Medium 4.8 Published Updated

Attackers can execute scripts in user browsers via reflected input in error responses rendered as HTML by Spring Web Flow's RemotingHandler.

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-2026-40986?

CVE-2026-40986 is a medium-severity cross-site scripting vulnerability in Spring Web Flow, published on 11 Jun 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

Spring Web Flow's JavaScript RemotingHandler renders the body of an error response as HTML even when the response is not "text/html", which can result in a scripting attack in the user's browser if the error response from the server contains error details with input reflected from an attacker.

Affected versions: Spring Web Flow 4.0.0; 3.0.0 through 3.0.1; 2.5.0 through 2.5.1.

Weakness: CWE-79

Which versions are affected by CVE-2026-40986?

6 open source packages ship an affected version, including org.springframework.webflow:spring-webflow. It affects 1 product.

PackageAffectedFixed in
org.springframework.webflow:spring-webflow MavenAll versions to 2.5.1None
org.springframework.webflow:spring-webflow MavenAll versions to 2.5.1None
org.springframework.webflow:spring-webflow MavenFrom 3.0.03.0.2
org.springframework.webflow:spring-webflow MavenFrom 3.0.03.0.2
org.springframework.webflow:spring-webflow MavenFrom 4.0.04.0.1
org.springframework.webflow:spring-webflow MavenFrom 4.0.04.0.1

Products include Broadcom Spring Web Flow.

How do I fix CVE-2026-40986?

Upgrade org.springframework.webflow:spring-webflow to a fixed version for your release line: 3.0.2 or 4.0.1.

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-2026-40986 being exploited?

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

Sources

Also known as GHSA-hw5c-xm3c-v96w, ROOT-APP-MAVEN-CVE-2026-40986.

Is CVE-2026-40986 in your software?

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

Check your SBOMs for free