CVE-2019-17640
📋 TL;DR
CVE-2019-17640 is a path traversal vulnerability in Eclipse Vert.x's StaticHandler component on Windows systems. It allows attackers to escape the configured webroot directory and access files in the current working directory by using backslashes in URLs. This affects Vert.x applications running on Windows that use StaticHandler to serve static files.
💻 Affected Systems
- Eclipse Vert.x
📦 What is this software?
Vert.x by Eclipse
Vert.x by Eclipse
Vert.x by Eclipse
Vert.x by Eclipse
Vert.x by Eclipse
Vert.x by Eclipse
Vert.x by Eclipse
Vert.x by Eclipse
Vert.x by Eclipse
⚠️ Risk & Real-World Impact
Worst Case
Complete server compromise through arbitrary file read, potentially leading to credential theft, configuration exposure, and lateral movement within the system.
Likely Case
Sensitive file disclosure including configuration files, source code, credentials, and other files accessible to the application user.
If Mitigated
Limited impact with proper file system permissions and defense-in-depth controls, potentially only exposing non-sensitive files.
🎯 Exploit Status
Simple path traversal using backslashes in URLs. No authentication required if static files are publicly accessible.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Vert.x 3.9.5 and 4.0.0.Beta4
Vendor Advisory: https://bugs.eclipse.org/bugs/show_bug.cgi?id=567416
Restart Required: Yes
Instructions:
1. Update Vert.x to version 3.9.5 or 4.0.0.Beta4 or later. 2. Update dependencies in your project configuration. 3. Rebuild and redeploy your application. 4. Restart the Vert.x instance.
🔧 Temporary Workarounds
Input Validation Filter
allAdd middleware to reject URLs containing backslashes before they reach StaticHandler
router.route().handler(ctx -> { if (ctx.request().path().contains("\\")) { ctx.fail(400); } else { ctx.next(); } });
Webroot Restriction
allConfigure StaticHandler with strict webroot and disable directory listing
StaticHandler.create().setWebRoot("webroot").setDirectoryListing(false);
🧯 If You Can't Patch
- Migrate affected applications to Linux/Unix systems where this vulnerability does not exist
- Implement strict file system permissions to limit what files the application user can access
🔍 How to Verify
Check if Vulnerable:
Check if running affected Vert.x version on Windows with StaticHandler enabled. Test by accessing a URL like http://host/..\..\file.txt
Check Version:
Check pom.xml or build.gradle for Vert.x version, or run: java -jar your-app.jar --version
Verify Fix Applied:
After patching, attempt the same path traversal with backslashes and verify access is denied
📡 Detection & Monitoring
Log Indicators:
- HTTP 400/403 errors for paths containing backslashes
- Unusual file access patterns from StaticHandler logs
- Multiple failed attempts with path traversal patterns
Network Indicators:
- HTTP requests containing backslashes in URLs
- Patterns of ../ or ..\ in request paths
- Unusual file extensions being requested
SIEM Query:
http.url:*\* OR http.url:*..\* status_code:200
🔗 References
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=567416
- https://lists.apache.org/thread.html/r591f6932560c8c46cee87415afed92924a982189fea7f7c9096f8e33%40%3Ccommits.pulsar.apache.org%3E
- https://lists.apache.org/thread.html/r8383b5e7344a8b872e430ad72241b84b83e9701d275c602cfe34a941%40%3Ccommits.servicecomb.apache.org%3E
- https://lists.apache.org/thread.html/r8d863b148efe778ce5f8f961d0cafeda399e681d3f0656233b4c5511%40%3Ccommits.pulsar.apache.org%3E
- https://lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26%40%3Ccommits.pulsar.apache.org%3E
- https://lists.apache.org/thread.html/rfd0ebf8387cfd0b959d1e218797e709793cce51a5ea2f84d0976f47d%40%3Ccommits.pulsar.apache.org%3E
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=567416
- https://lists.apache.org/thread.html/r591f6932560c8c46cee87415afed92924a982189fea7f7c9096f8e33%40%3Ccommits.pulsar.apache.org%3E
- https://lists.apache.org/thread.html/r8383b5e7344a8b872e430ad72241b84b83e9701d275c602cfe34a941%40%3Ccommits.servicecomb.apache.org%3E
- https://lists.apache.org/thread.html/r8d863b148efe778ce5f8f961d0cafeda399e681d3f0656233b4c5511%40%3Ccommits.pulsar.apache.org%3E
- https://lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26%40%3Ccommits.pulsar.apache.org%3E
- https://lists.apache.org/thread.html/rfd0ebf8387cfd0b959d1e218797e709793cce51a5ea2f84d0976f47d%40%3Ccommits.pulsar.apache.org%3E