CVE-2026-40986

Cross-Site Scripting
Affects
Spring Web Flow
in
Spring
No items found.
Versions
>=2.5.0 <=2.5.1, >=3.0.0 <=3.0.1, 4.0.0
Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

Spring Web Flow is a framework, built on Spring MVC, for defining and executing UI flows within web applications; its spring-js-resources artifact ships a bundled JavaScript library (Spring-Dojo.js) that provides client-side Ajax behaviors such as the RemotingHandler. A medium-severity vulnerability (CVE-2026-40986) has been identified in the JavaScript RemotingHandler, which renders the body of an Ajax error response as HTML even when the response is not declared as text/html. When a server error response reflects attacker-controlled input in its body, that input is inserted into the page as markup and any embedded script executes in the victim's browser.

Per OWASP, Cross-Site Scripting (XSS) attacks are a type of injection in which malicious scripts are injected into otherwise benign and trusted websites; they occur when an attacker uses a web application to send malicious code, generally in the form of a browser-side script, to a different end user.

This issue affects >=2.5.0 <=2.5.1, >=3.0.0 <=3.0.1, and 4.0.0 of Spring Web Flow. Versions that are no longer supported are also affected.

Details

Module Info

Vulnerability Info

The vulnerability is exploitable only when the application serves the org.springframework.webflow:spring-js-resources artifact and the bundled Spring-Dojo.js is loaded and used for Ajax requests. When an Ajax request handled by Spring.RemotingHandler returns an error response, the handler displays the response body in a dialog by calling setContent with the raw responseText:

dialog.setContent(ioArgs.xhr.responseText);

setContent inserts the supplied string into the dialog's DOM node as HTML, with no regard for the response Content-Type. If the server's error response echoes attacker-influenced input back in its body (for example, a request parameter reflected into an error message), the markup in that body is parsed and executed, resulting in a reflected cross-site scripting attack in the user's browser. The remediation makes the handler render the body as HTML only when the server explicitly returns a text/html Content-Type; otherwise the body is assigned via textContent, which escapes markup so no script can run.

Mitigation

The affected Spring Web Flow lines that are End-of-Life will not receive further public security updates. The 2.5.x line in particular has no publicly available fix.

Users should take one of the following actions:

  1. Upgrade to a supported fixed version where one is publicly available: Spring Web Flow 4.0.1 or 3.0.2.
  2. For End-of-Life lines that have no publicly available fix, obtain continued security support through a commercial support partner like HeroDevs. NES for Spring Web Flow provides a drop-in patched build for affected lines.
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-40986
PROJECT Affected
Spring Web Flow
Versions Affected
>=2.5.0 <=2.5.1, >=3.0.0 <=3.0.1, 4.0.0
NES Versions Affected
Published date
June 11, 2026
≈ Fix date
June 11, 2026
Category
Cross-Site Scripting
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Spring
Rss feed icon
Subscribe via RSS
or

By clicking “submit” I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.