CVE-2020-13935

7.5 HIGH

📋 TL;DR

This vulnerability in Apache Tomcat allows attackers to cause denial of service by sending WebSocket frames with invalid payload lengths, which triggers an infinite loop. It affects Tomcat versions 10.0.0-M1 to 10.0.0-M6, 9.0.0.M1 to 9.0.36, 8.5.0 to 8.5.56, and 7.0.27 to 7.0.104. Systems using WebSocket functionality in these Tomcat versions are vulnerable.

💻 Affected Systems

Products:
  • Apache Tomcat
Versions: 10.0.0-M1 to 10.0.0-M6, 9.0.0.M1 to 9.0.36, 8.5.0 to 8.5.56, 7.0.27 to 7.0.104
Operating Systems: All operating systems running affected Tomcat versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with WebSocket functionality enabled and in use.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete denial of service causing Tomcat to become unresponsive, requiring restart and potentially affecting all hosted applications.

🟠

Likely Case

Service disruption and resource exhaustion leading to degraded performance or temporary unavailability.

🟢

If Mitigated

Minimal impact if WebSocket functionality is disabled or proper rate limiting is in place.

🌐 Internet-Facing: HIGH - Internet-facing Tomcat instances with WebSocket enabled are directly exposed to exploitation.
🏢 Internal Only: MEDIUM - Internal systems are still vulnerable but require attacker access to internal network.

🎯 Exploit Status

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

Exploitation requires sending specially crafted WebSocket frames but is straightforward for attackers with network access.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Tomcat 10.0.0-M7, 9.0.37, 8.5.57, 7.0.105

Vendor Advisory: https://lists.apache.org/thread.html/rd48c72bd3255bda87564d4da3791517c074d94f8a701f93b85752651%40%3Cannounce.tomcat.apache.org%3E

Restart Required: Yes

Instructions:

1. Download patched Tomcat version from Apache website. 2. Stop Tomcat service. 3. Backup current installation. 4. Replace with patched version. 5. Restart Tomcat service.

🔧 Temporary Workarounds

Disable WebSocket Support

all

If WebSocket functionality is not required, disable it to prevent exploitation.

Modify server.xml to remove WebSocket connectors and related configurations

Implement Rate Limiting

all

Configure network devices or WAF to limit WebSocket connections and frame rates.

Configure rate limiting rules for WebSocket traffic on firewall/WAF

🧯 If You Can't Patch

  • Implement network segmentation to restrict access to Tomcat instances
  • Deploy Web Application Firewall (WAF) with WebSocket protection rules

🔍 How to Verify

Check if Vulnerable:

Check Tomcat version using version command or examine server logs for version information.

Check Version:

catalina.sh version (Linux) or catalina.bat version (Windows)

Verify Fix Applied:

Verify Tomcat version is 10.0.0-M7+, 9.0.37+, 8.5.57+, or 7.0.105+ and test WebSocket functionality.

📡 Detection & Monitoring

Log Indicators:

  • Multiple WebSocket connection errors
  • Unusual WebSocket frame patterns
  • Tomcat process consuming excessive CPU

Network Indicators:

  • High volume of WebSocket traffic with abnormal payload sizes
  • Multiple WebSocket handshake failures

SIEM Query:

source="tomcat" AND ("WebSocket" OR "ws:") AND (error OR exception OR "invalid payload")

🔗 References

📤 Share & Export