CVE-2021-3649

7.5 HIGH

📋 TL;DR

CVE-2021-3649 is a regular expression denial of service (ReDoS) vulnerability in Chatwoot's URL validation logic. Attackers can cause CPU exhaustion and service degradation by sending specially crafted URLs. All Chatwoot instances using vulnerable versions are affected.

💻 Affected Systems

Products:
  • Chatwoot
Versions: Versions before commit aa7db90cd2d23dbcf22a94f1e4c100dd909e2172
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All Chatwoot deployments using default configuration are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service unavailability due to CPU exhaustion, potentially affecting all Chatwoot functionality and dependent services.

🟠

Likely Case

Degraded performance and intermittent service disruptions affecting chat functionality and user experience.

🟢

If Mitigated

Minimal impact with proper rate limiting and resource monitoring in place.

🌐 Internet-Facing: HIGH - Publicly accessible Chatwoot instances are directly vulnerable to unauthenticated attacks.
🏢 Internal Only: MEDIUM - Internal instances are still vulnerable but attack surface is reduced.

🎯 Exploit Status

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

Exploitation requires sending malicious URLs to vulnerable endpoints, which is straightforward.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Commit aa7db90cd2d23dbcf22a94f1e4c100dd909e2172 and later

Vendor Advisory: https://github.com/chatwoot/chatwoot/commit/aa7db90cd2d23dbcf22a94f1e4c100dd909e2172

Restart Required: Yes

Instructions:

1. Update Chatwoot to latest version or apply commit aa7db90cd2d23dbcf22a94f1e4c100dd909e2172. 2. Restart Chatwoot services. 3. Verify the fix is applied.

🔧 Temporary Workarounds

Rate Limiting

all

Implement rate limiting on URL validation endpoints to reduce impact of ReDoS attacks.

# Configure rate limiting in your web server or application firewall

Input Validation

all

Add additional input validation to reject suspicious URL patterns before regex processing.

# Implement pre-validation in application code

🧯 If You Can't Patch

  • Implement strict rate limiting on all URL processing endpoints
  • Deploy WAF rules to block malicious URL patterns and monitor for ReDoS attempts

🔍 How to Verify

Check if Vulnerable:

Check if Chatwoot version is before commit aa7db90cd2d23dbcf22a94f1e4c100dd909e2172 by examining the git commit history or version metadata.

Check Version:

git log --oneline -1

Verify Fix Applied:

Verify the commit aa7db90cd2d23dbcf22a94f1e4c100dd909e2172 is present in your Chatwoot installation.

📡 Detection & Monitoring

Log Indicators:

  • High CPU usage spikes
  • Slow response times on URL validation endpoints
  • Repeated requests with complex URL patterns

Network Indicators:

  • Unusual volume of requests to URL validation endpoints
  • Requests containing specially crafted URLs with repeating patterns

SIEM Query:

source="chatwoot" AND (cpu_usage>90 OR response_time>5000ms) AND uri="*validate*"

🔗 References

📤 Share & Export