CVE-2024-38819

7.5 HIGH

📋 TL;DR

Spring applications using WebMvc.fn or WebFlux.fn functional web frameworks to serve static resources are vulnerable to path traversal attacks. Attackers can craft HTTP requests to access any file accessible to the Spring application process. This affects applications using these specific Spring framework components with default or misconfigured static resource handling.

💻 Affected Systems

Products:
  • Spring Framework
  • Spring Boot applications using WebMvc.fn or WebFlux.fn
Versions: Spring Framework 6.1.0 to 6.1.18, 6.0.0 to 6.0.28, and older unsupported versions
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using functional web frameworks (WebMvc.fn or WebFlux.fn) to serve static resources. Traditional annotation-based controllers are not affected.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete file system compromise allowing reading of sensitive files like configuration files, credentials, private keys, and application source code, potentially leading to full system takeover.

🟠

Likely Case

Unauthorized access to configuration files, source code, or other sensitive files stored in accessible directories, leading to information disclosure and potential credential theft.

🟢

If Mitigated

Limited impact if proper file system permissions restrict application process access and sensitive files are stored outside accessible paths.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires only HTTP requests with crafted paths. No authentication or special privileges needed.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Spring Framework 6.1.19 or 6.0.29

Vendor Advisory: https://spring.io/security/cve-2024-38819

Restart Required: Yes

Instructions:

1. Update Spring Framework to version 6.1.19 or 6.0.29. 2. Update Spring Boot to version 3.3.2 or 3.2.10 if using Spring Boot. 3. Restart the application.

🔧 Temporary Workarounds

Disable static resource serving via functional endpoints

all

Switch to using traditional annotation-based controllers for serving static resources instead of WebMvc.fn or WebFlux.fn functional endpoints.

Implement custom path validation

all

Add server-side validation to reject requests containing path traversal sequences like '../' or absolute paths.

🧯 If You Can't Patch

  • Implement strict file system permissions to limit what files the application process can access
  • Use web application firewall (WAF) rules to block requests containing path traversal patterns

🔍 How to Verify

Check if Vulnerable:

Check if application uses WebMvc.fn or WebFlux.fn for static resource serving and runs on vulnerable Spring Framework versions.

Check Version:

Check application dependencies or use: java -cp [application.jar] org.springframework.boot.loader.JarLauncher --version

Verify Fix Applied:

Verify Spring Framework version is 6.1.19+, 6.0.29+, or Spring Boot 3.3.2+/3.2.10+. Test with path traversal requests that should be rejected.

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests containing '../' sequences
  • Access to unexpected file paths in static resource handlers
  • 403 or 404 errors for path traversal attempts after patching

Network Indicators:

  • HTTP requests with encoded path traversal sequences (%2e%2e%2f, ..%2f)
  • Requests to non-standard static resource paths

SIEM Query:

http.url:*%2e%2e* OR http.uri:*..* AND (http.user_agent:*Spring* OR destination.port:8080)

🔗 References

📤 Share & Export