---
id: CVE-2026-41845
title: >-
  Due to incorrect escaping, the use of JavaScriptUtils.javaScriptEscape() may
  lead to JavaScript code injection in the browser, potentially resulting in a
  cross-site scripting (XSS) vulnerability.


  Affected versions:

  Spring Framework 7.0.…
summary: >-
  Due to incorrect escaping, the use of JavaScriptUtils.javaScriptEscape() may
  lead to JavaScript code injection in the browser, potentially resulting in a
  cross-site scripting (XSS) vulnerability.


  Affected versions:

  Spring Framework 7.0.…
severity: high
cvss: 7.1
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N'
cwe:
  - CWE-79
vendor: vmware
product: spring_framework
affected:
  - 'spring_framework >= 5.3.0, < 5.3.49'
  - 'spring_framework >= 6.1.0, < 6.1.28'
  - 'spring_framework >= 6.2.0, < 6.2.18.1'
  - 'spring_framework >= 7.0.0, < 7.0.7.1'
patched:
  - spring_framework 7.0.7.1
published: '2026-06-09'
updated: '2026-07-17'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-41845'
references:
  - url: 'https://spring.io/security/cve-2026-41845'
    label: security@vmware.com
tags:
  - nvd
epss: 0.00161
epssPercentile: 0.05716
ingestedAt: '2026-07-17T21:16:23.806Z'
---

## Overview

Due to incorrect escaping, the use of JavaScriptUtils.javaScriptEscape() may lead to JavaScript code injection in the browser, potentially resulting in a cross-site scripting (XSS) vulnerability.

Affected versions:
Spring Framework 7.0.0 through 7.0.7; 6.2.0 through 6.2.18; 6.1.0 through 6.1.27; 5.3.0 through 5.3.48.

## Affected

- `spring_framework >= 5.3.0, < 5.3.49`
- `spring_framework >= 6.1.0, < 6.1.28`
- `spring_framework >= 6.2.0, < 6.2.18.1`
- `spring_framework >= 7.0.0, < 7.0.7.1`

## Remediation

Upgrade past the affected range:

- `spring_framework 7.0.7.1`
