CVE-2026-41846 is a medium-severity (CVSS 5.9) Cross-site Scripting (XSS) vulnerability in org.springframework:spring-webmvc. A fix is available for org.springframework:spring-webmvc — see the affected versions and patch details below.
Spring Framework Cross-site Scripting via JSP Form Tags
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-41846.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.springframework:spring-webmvc☕org.springframework:spring-webmvc☕org.springframework:spring-webmvc☕org.springframework:spring-webmvcReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Spring MVC applications which accept user-supplied values in the cssClass, cssErrorClass, or cssStyle attributes of JSP form tags allow arbitrary HTML/JavaScript code injection, 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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.springframework:spring-webmvc | ≥ 7.0.0&&< 7.0.8 | 7.0.8org.springframework:spring-webmvc:7.0.8 |
| ☕Maven | org.springframework:spring-webmvc | ≥ 6.2.0&&< 6.2.19 | 6.2.19org.springframework:spring-webmvc:6.2.19 |
| ☕Maven | org.springframework:spring-webmvc | ≥ 6.1.0 | No fix |
| ☕Maven | org.springframework:spring-webmvc | all versions | No fix |
Affected Products
spring frameworkvmwareDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.springframework:spring-webmvc, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.springframework:spring-webmvc to 7.0.8 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-41846 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
A flaw was found in Spring Framework. Spring MVC applications which accept user-supplied values in the cssClass, cssErrorClass, or cssStyle attributes of JSP form tags allow arbitrary HTML/JavaScript code injection, potentially resulting in a cross-site scripting (XSS) vulnerability.
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for CVE-2026-41846 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2026-41846 in your dependencies?
Find it across Maven, including transitive dependencies.