CVE-2026-22737
Spring Framework: Spring Framework: Information disclosure via Java scripting engine enabled template views
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · March 20, 2026
Updated · July 3, 2026
Description
A flaw was found in Spring Framework. When Java scripting engine enabled template views (such as those using JRuby or Jython) are used in Spring MVC and Spring WebFlux applications, a remote attacker can exploit this to disclose sensitive content from files located outside the intended script template view directories. This information disclosure can expose confidential data.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
To mitigate this issue, avoid using Java scripting engine enabled template views (e.g., JRuby, Jython) in Spring MVC and Spring WebFlux applications. If these engines are not essential for application functionality, disable or remove their integration to prevent unauthorized file disclosure. Review application configurations to ensure that template view directories are strictly controlled and that no external scripting engines are inadvertently enabled.
CVSS / CWE
CVSS 3.1 · 6.5CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')