Skip to main content

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

CVE-2024-38816

Severity High
Score 7.5/10

Summary

Applications serving static resources through the functional web frameworks "WebMvc.fn" or "WebFlux.fn" are vulnerable to Path Traversal attacks. An attacker can craft malicious HTTP requests and obtain any file on the file system that is also accessible to the process in which the Spring application is running. Specifically, an application is vulnerable when both of the following are true: a) The web application uses "RouterFunctions" to serve static resources, b) Resource handling is explicitly configured with a "FileSystemResource" location. However, malicious requests are blocked and rejected when any of the following is true: A) The Spring Security HTTP Firewall "https://docs.spring.io/spring-security/reference/servlet/exploits/firewall.html" is in use, or B) The application runs on Tomcat or Jetty. This vulnerability affects org.springframework:spring-webmvc package versions 5.2.0.M1 through 5.3.39, 6.0.0-M1 through 6.0.23, and 6.1.0-M1 through 6.1.12. This vulnerability also affects org.springframework:spring-webflux package versions through 5.3.39, 6.0.0-M1 through 6.0.23, and 6.1.0-M1 through 6.1.12.

  • LOW
  • NETWORK
  • NONE
  • UNCHANGED
  • NONE
  • NONE
  • HIGH
  • NONE

CWE-22 - Path Traversal

Path traversal (or directory traversal), is a vulnerability that allows malicious users to traverse the server's root directory, gaining access to arbitrary files and folders such as application code & data, back-end credentials, and sensitive operating system files. In the worst-case scenario, an attacker could potentially execute arbitrary files on the server, resulting in a denial of service attack. Such an exploit may severely impact the integrity, confidentiality, and availability of an application.

Advisory Timeline

  • Published