Published Date: December 20, 2024
Package | Affected Versions | Patched Versions | Severity |
---|---|---|---|
📦 org.springframework:spring-webflux (Maven) | < 6.1.14 | 6.1.14 | High |
Description
Overview
A path traversal vulnerability in the Spring Framework’s static resource handling affects applications using the
WebMvc.fn
or WebFlux.fn
functional web frameworks. Attackers can exploit this issue to access files on the host system if they can craft specific HTTP requests. The vulnerability is classified as high severity.Affected Components
- Package:
org.springframework:spring-webflux
(Maven)
- Affected Versions: All versions earlier than 6.1.14
- Patched Version: 6.1.14
- Package:
org.springframework:spring-webmvc
(Maven)
- Affected Versions: All versions earlier than 6.1.14
- Patched Version: 6.1.14
How It Works
Applications using these frameworks serve static resources. The vulnerability arises because the framework doesn’t properly validate file paths in incoming HTTP requests. Attackers can use specially crafted requests to trick the server into serving files outside the intended directory.
For example, a malicious user could include sequences like
../../
in their requests to access restricted files.Impact
- Unauthorized access to sensitive files.
- Possible exposure of configuration files, logs, or other private data accessible by the application process.
Patches & Workarounds
For
spring-webflux
:Temporary Workaround
If you cannot immediately update:
- Use strict path validation in your application code to reject requests containing sequences like
../
. - Disable serving static resources via these frameworks and use external mechanisms with stricter controls.