Description
Spring MVC and WebFlux applications that obtain a data-binding Errors instance with HTML escaping enabled and then render field errors using the no-argument Errors.getFieldErrors() or Errors.getFieldError() accessors are vulnerable to arbitrary HTML/JavaScript code injection, potentially resulting in a reflected cross-site scripting (XSS) vulnerability.
Spring Framework 7.0.0 - 7.0.8
Spring Framework 6.2.0 - 6.2.19
Spring Framework 6.1.0 - 6.1.28
Spring Framework 6.0.0 - 6.0.30
Spring Framework 5.3.0 - 5.3.49
Spring Framework 5.2.25.RELEASE and earlier
Published: 2026-08-27
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Spring MVC and WebFlux applications that retrieve a data‑binding Errors instance with HTML escaping enabled and render field errors using the no‑argument Errors.getFieldErrors() or Errors.getFieldError() methods are able to inject arbitrary HTML and JavaScript. The reflected cross‑site scripting can enable an attacker to steal session cookies, deface content, or execute malicious actions on behalf of the victim. This flaw arises from improper neutralization of user input during error rendering, classifiable as CWE‑79.

Affected Systems

Affected components are the Spring Framework. Versions 7.0.0 through 7.0.8, 6.2.0 through 6.2.19, 6.1.0 through 6.1.28, 6.0.0 through 6.0.30, 5.3.0 through 5.3.49, and 5.2.25.RELEASE and earlier are vulnerable.

Risk and Exploitability

The flaw is exploitable via crafted HTTP requests that trigger error rendering. An attacker can embed malicious scripts that execute in the context of users who view the error output. The vulnerability is reflected, requiring no persistent state, and does not require authentication unless the target page is restricted. While the CVSS score is not provided, reflected XSS typically poses high impact to confidentiality, integrity, and potentially availability. EPSS is not available and the vulnerability is not listed in the CISA KEV catalogue, yet any Spring application that relies on the affected error handling patterns remains at substantial risk.

Generated by OpenCVE AI on August 28, 2026 at 06:59 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Spring Framework to a non‑vulnerable release: 7.0.9 or later, 6.2.20 or later, 6.1.29 or later, 6.0.31 or later, 5.3.50 or later, or 5.2.26.RELEASE or later.
  • If an immediate upgrade is not feasible, disable HTML escaping on the Errors instance or avoid using the no‑argument getFieldErrors/getFieldError methods for rendering; instead, use dedicated error handling that ensures proper escaping.
  • As a temporary mitigation, validate or sanitize the output returned by Errors.getFieldErrors() and Errors.getFieldError() before rendering, ensuring that any user input is escaped or stripped of script tags.
  • Implement a strict Content Security Policy that blocks inline scripts and untrusted sources to limit the impact of any remaining XSS payloads.

Generated by OpenCVE AI on August 28, 2026 at 06:59 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

References
History

Fri, 28 Aug 2026 07:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-79

Fri, 28 Aug 2026 07:00:00 +0000

Type Values Removed Values Added
First Time appeared Spring
Spring spring Framework
Vendors & Products Spring
Spring spring Framework

Thu, 27 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
Description Spring MVC and WebFlux applications that obtain a data-binding Errors instance with HTML escaping enabled and then render field errors using the no-argument Errors.getFieldErrors() or Errors.getFieldError() accessors are vulnerable to arbitrary HTML/JavaScript code injection, potentially resulting in a reflected cross-site scripting (XSS) vulnerability. Spring Framework 7.0.0 - 7.0.8 Spring Framework 6.2.0 - 6.2.19 Spring Framework 6.1.0 - 6.1.28 Spring Framework 6.0.0 - 6.0.30 Spring Framework 5.3.0 - 5.3.49 Spring Framework 5.2.25.RELEASE and earlier
Title Spring Framework Cross-site Scripting via EscapedErrors
References

Subscriptions

Spring Spring Framework
cve-icon MITRE

Status: PUBLISHED

Assigner: vmware

Published:

Updated: 2026-08-27T17:57:37.157Z

Reserved: 2026-07-04T18:13:26.297Z

Link: CVE-2026-59281

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-27T20:17:54.267

Modified: 2026-08-27T20:17:54.267

Link: CVE-2026-59281

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-28T07:00:12Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')