CVE-2026-22737
Apache Log4j vulnerability analysis and mitigation

Overview

CVE-2026-22737 is a path traversal vulnerability (CWE-22) in Spring Framework's Java scripting engine template view handling, classified as Spring Framework Improper Path Limitation with Script View Templates. When Java scripting engines such as JRuby or Jython are enabled for template views in Spring MVC or Spring WebFlux applications, an attacker can trigger disclosure of file content from outside the configured script template view directories. The vulnerability affects Spring Framework versions 5.3.0–5.3.46, 6.1.0–6.1.25, 6.2.0–6.2.16, and 7.0.0–7.0.5; older unsupported versions are also affected. It was published on March 19, 2026, and carries a CVSS v3.1 base score of 5.9 (Medium) (Spring Advisory, Red Hat Bugzilla).

Technical details

The root cause is improper limitation of a pathname to a restricted directory (CWE-22 / Path Traversal). Exploitation requires two specific application conditions: the application must have a wildcard mapping for /** that results in view rendering, and the view name must not be explicitly specified — allowing attacker-controlled input to influence the resolved template path. When a Java scripting engine (e.g., JRuby, Jython) is configured for script template views, the framework fails to adequately restrict the resolved file path to the configured template directory, enabling traversal to arbitrary files on the server's filesystem. The attack is network-based, requires no authentication or user interaction, but is rated High Complexity due to the specific application configuration prerequisites (Spring Advisory, Red Hat Bugzilla).

Impact

Successful exploitation results in unauthorized disclosure of file content from outside the configured script template view directories, impacting confidentiality (rated High) with no integrity or availability impact. An attacker could read sensitive server-side files such as application configuration files, credentials, private keys, or other confidential data accessible to the Spring application process. The scope is limited to the affected system (unchanged scope), but credential exposure could enable lateral movement or further compromise of dependent systems (Spring Advisory, Feedly).

Exploitation steps

  1. Reconnaissance: Identify Spring MVC or Spring WebFlux applications that use Java scripting engine-based template views (JRuby, Jython) and have a wildcard /** view mapping configured, using tools like Shodan, Censys, or manual application fingerprinting.
  2. Confirm preconditions: Verify that the target application does not explicitly specify view names in its controller mappings, meaning the view name is derived from request input (e.g., URL path segments).
  3. Craft traversal request: Send an HTTP request to the application with a path-traversal sequence embedded in the URL or request parameter that influences the view name resolution (e.g., ../../etc/passwd or equivalent encoded variants).
  4. Trigger template rendering: The Spring framework resolves the manipulated view name through the scripting engine template resolver, which follows the traversal path outside the configured template directory.
  5. Retrieve file contents: The server returns the content of the targeted file as part of the HTTP response, disclosing sensitive data such as configuration files, credentials, or application secrets (Spring Advisory).

Indicators of compromise

  • Network: Unusual HTTP requests containing path traversal sequences (e.g., ../, %2e%2e%2f, ..%2f) in URL paths or parameters targeting Spring MVC/WebFlux endpoints with wildcard mappings.
  • Logs: Application access logs showing requests with traversal patterns in view-name-derived URL segments; HTTP 200 responses to requests referencing files outside the template directory (e.g., /WEB-INF/, /etc/, system configuration paths).
  • Application Behavior: Unexpected file content returned in HTTP responses (e.g., /etc/passwd contents, properties files, YAML configuration data) from template rendering endpoints.
  • Process: Spring application process reading files outside the designated template directory, observable via OS-level file access auditing (e.g., Linux auditd rules on sensitive file paths).

Mitigation and workarounds

Users should upgrade Spring Framework to the corresponding fixed versions: 7.0.6 (for 7.0.x), 6.2.17 (for 6.2.x), 6.1.26 (for 6.1.x, commercial support), and 5.3.47 (for 5.3.x, commercial support). The Spring advisory states no additional mitigation steps are necessary beyond upgrading. If immediate patching is not feasible, consider disabling Java scripting engine-based template views (JRuby, Jython) if not required, or explicitly specifying view names in all controller mappings to eliminate the wildcard view resolution path. IBM has also released patches for affected downstream products including Cloud Pak for AIOps, watsonx.data, Operational Decision Manager, Library Support for Spring, and Business Automation Insights (Spring Advisory, IBM CloudPak Advisory, IBM Library Spring).

Community reactions

Broadcom/VMware Tanzu published the official security advisory on March 19, 2026, crediting researcher Gyu-hyeok Lee (g2h) for responsible disclosure (Spring Advisory). Heise reported on the vulnerability as part of broader Spring product security updates, noting multiple Spring products were affected (Heise). HeroDevs included CVE-2026-22737 in their March 2026 Spring CVE roundup, highlighting it as one of six new vulnerabilities patched across the Spring ecosystem (HeroDevs Blog). Techzine noted the update as part of what was described as the largest Spring security update ever from Broadcom (Techzine).

Additional resources


SourceThis report was generated using AI

Related Apache Log4j vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-40974CRITICAL9.8
  • Java logoJava
  • org.springframework.boot:spring-boot-cassandra
NoYesApr 28, 2026
CVE-2026-40972HIGH7.5
  • Java logoJava
  • log4j-web
NoYesApr 28, 2026
CVE-2026-40977MEDIUM6.7
  • Java logoJava
  • log4j:2::log4j
NoYesApr 28, 2026
CVE-2026-49844MEDIUM6.3
  • Apache Log4j logoApache Log4j
  • log4j-web
NoYesJul 10, 2026
CVE-2026-22741LOW3.1
  • Apache Log4j logoApache Log4j
  • pki-core:10.6::resteasy.src
NoYesApr 29, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management