Cross-site scripting in Spring Framework - CVE-2026-59281

 

Cross-site scripting in Spring Framework - CVE-2026-59281

Published: August 28, 2026


Vulnerability identifier: #VU146229
CSH Severity: Medium
CVSS v4: 5.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N]
CVE-ID: CVE-2026-59281
CWE-ID: CWE-79
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to inject arbitrary html/javascript code.

The vulnerability exists due to cross-site scripting in Errors.getFieldErrors() and Errors.getFieldError() accessors when rendering field errors from a data-binding Errors instance with HTML escaping enabled. A remote attacker can supply crafted input that is later rendered in field errors to inject arbitrary html/javascript code.

The issue can lead to reflected cross-site scripting in Spring MVC and WebFlux applications.


Affected software

Spring Framework
Library Support for Spring

How to mitigate CVE-2026-59281

Install security update from vendor's website.

Spring Framework - addressed in versions 5.2.26, 5.3.50, 6.0.31, 6.1.29, 6.2.20, 7.0.8.1, 7.0.9
Library Support for Spring - update to 3.5.19

External References

Related Security Bulletins