CVE-2021-23937
📋 TL;DR
This vulnerability in Apache Wicket allows attackers to trigger arbitrary DNS lookups from the server by manipulating the X-Forwarded-For header. This can lead to DNS amplification attacks that overload internal DNS servers or slow down the web application, causing denial of service. Affected versions include Apache Wicket 9.x up to 9.2.0, 8.x up to 8.11.0, 7.x up to 7.17.0, and 6.x from 6.2.0 onward.
💻 Affected Systems
- Apache Wicket
📦 What is this software?
Wicket by Apache
Wicket by Apache
Wicket by Apache
Wicket by Apache
⚠️ Risk & Real-World Impact
Worst Case
Complete denial of service for both the Apache Wicket application and internal DNS infrastructure, potentially disrupting multiple dependent services.
Likely Case
Degraded application performance and intermittent service disruptions due to DNS query overload.
If Mitigated
Minimal impact with proper header sanitization and DNS rate limiting in place.
🎯 Exploit Status
Exploitation requires only HTTP request manipulation with malicious X-Forwarded-For headers.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Apache Wicket 9.3.0, 8.12.0, 7.18.0, 6.27.0
Vendor Advisory: https://lists.apache.org/thread.html/r127c0c1f3cb71e5bc619ad1e4b898b97c49758d1f20a54042966473e%40%3Cannounce.wicket.apache.org%3E
Restart Required: Yes
Instructions:
1. Identify Apache Wicket version. 2. Upgrade to patched version: 9.3.0, 8.12.0, 7.18.0, or 6.27.0. 3. Restart application server. 4. Verify upgrade with version check.
🔧 Temporary Workarounds
Sanitize X-Forwarded-For Header
allImplement input validation to sanitize X-Forwarded-For headers before processing by WebClientInfo.
Disable WebClientInfo DNS Resolution
allConfigure Apache Wicket to disable DNS resolution for X-Forwarded-For headers in WebClientInfo.
🧯 If You Can't Patch
- Implement web application firewall (WAF) rules to block or sanitize X-Forwarded-For headers containing suspicious patterns.
- Configure DNS server rate limiting and monitoring to detect and mitigate amplification attacks.
🔍 How to Verify
Check if Vulnerable:
Check Apache Wicket version against affected ranges: 9.x ≤ 9.2.0, 8.x ≤ 8.11.0, 7.x ≤ 7.17.0, 6.x ≥ 6.2.0.
Check Version:
Check application configuration or Maven pom.xml for wicket-core version.
Verify Fix Applied:
Confirm version is upgraded to 9.3.0, 8.12.0, 7.18.0, or 6.27.0 and test with malicious X-Forwarded-For headers.
📡 Detection & Monitoring
Log Indicators:
- Unusual volume of DNS queries from web server
- Multiple requests with varied X-Forwarded-For headers
Network Indicators:
- Spike in DNS traffic from web server to internal DNS
- HTTP requests with malformed X-Forwarded-For headers
SIEM Query:
source="web_server" AND (event="DNS_query" AND count > threshold) OR (http.header="X-Forwarded-For" AND pattern="malicious")
🔗 References
- https://lists.apache.org/thread.html/r127c0c1f3cb71e5bc619ad1e4b898b97c49758d1f20a54042966473e%40%3Cannounce.wicket.apache.org%3E
- https://lists.apache.org/thread.html/r127c0c1f3cb71e5bc619ad1e4b898b97c49758d1f20a54042966473e%40%3Cusers.wicket.apache.org%3E
- https://lists.apache.org/thread.html/r8ccbd91b56ebf045d151bd4282bfeea7842a0698a0b76118fca8fe78%40%3Cdev.wicket.apache.org%3E
- https://lists.apache.org/thread.html/rc2ef22f90793e158cef65a7e370cdbca023c499d1403d65feeca870d%40%3Cusers.wicket.apache.org%3E
- https://lists.apache.org/thread.html/r127c0c1f3cb71e5bc619ad1e4b898b97c49758d1f20a54042966473e%40%3Cannounce.wicket.apache.org%3E
- https://lists.apache.org/thread.html/r127c0c1f3cb71e5bc619ad1e4b898b97c49758d1f20a54042966473e%40%3Cusers.wicket.apache.org%3E
- https://lists.apache.org/thread.html/r8ccbd91b56ebf045d151bd4282bfeea7842a0698a0b76118fca8fe78%40%3Cdev.wicket.apache.org%3E
- https://lists.apache.org/thread.html/rc2ef22f90793e158cef65a7e370cdbca023c499d1403d65feeca870d%40%3Cusers.wicket.apache.org%3E