CVE-2021-23937

7.5 HIGH

📋 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

Products:
  • Apache Wicket
Versions: Apache Wicket 9.x up to 9.2.0, 8.x up to 8.11.0, 7.x up to 7.17.0, 6.x from 6.2.0 onward
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists when using WebClientInfo with X-Forwarded-For header processing enabled.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

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

all

Implement input validation to sanitize X-Forwarded-For headers before processing by WebClientInfo.

Disable WebClientInfo DNS Resolution

all

Configure 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

📤 Share & Export