Arbitrary Code Injection Vulnerability in Spring MVC and WebFlux Applications
CVE-2026-59281
6.1MEDIUM
What is CVE-2026-59281?
Spring MVC and WebFlux applications are susceptible to a serious security vulnerability that arises when a data-binding Errors instance, with HTML escaping enabled, is used to render field errors via the no-argument Errors.getFieldErrors() or Errors.getFieldError() methods. This flaw allows attackers to inject arbitrary HTML or JavaScript code into the application, potentially leading to reflected cross-site scripting (XSS) attacks. It is crucial for developers to assess their Spring Framework-based applications for this vulnerability and apply the necessary patches to mitigate the risk.
Affected Version(s)
Spring Framework 7.0.0 <= 7.0.8
Spring Framework 6.2.0 <= 6.2.19
Spring Framework 6.1.0 <= 6.1.28
