CVE-2022-44571

7.5 HIGH

📋 TL;DR

CVE-2022-44571 is a denial of service vulnerability in Rack's Content-Disposition header parser that allows attackers to craft malicious inputs causing excessive processing time. This affects virtually all Ruby on Rails applications that parse multipart posts using Rack, potentially leading to service disruption.

💻 Affected Systems

Products:
  • Rack
  • Ruby on Rails
  • Applications using Rack for multipart parsing
Versions: Rack versions before 2.0.9.2, 2.1.4.2, 2.2.4.1, and 3.0.0.1
Operating Systems: All operating systems running affected Rack versions
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using Rack's multipart parsing functionality is vulnerable by default when using affected versions.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service unavailability due to resource exhaustion from crafted malicious requests overwhelming the parser.

🟠

Likely Case

Degraded application performance and intermittent service disruptions from targeted DoS attacks.

🟢

If Mitigated

Minimal impact with proper rate limiting, request validation, and updated Rack versions.

🌐 Internet-Facing: HIGH - Internet-facing applications are directly exposed to crafted malicious requests.
🏢 Internal Only: MEDIUM - Internal applications could still be targeted by authenticated users or compromised internal systems.

🎯 Exploit Status

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

Exploitation requires crafting malicious Content-Disposition headers but doesn't require authentication or complex techniques.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Rack 2.0.9.2, 2.1.4.2, 2.2.4.1, or 3.0.0.1

Vendor Advisory: https://discuss.rubyonrails.org/t/cve-2022-44571-possible-denial-of-service-vulnerability-in-rack-content-disposition-parsing/82126

Restart Required: Yes

Instructions:

1. Update Gemfile to specify patched Rack version. 2. Run 'bundle update rack'. 3. Restart application server. 4. Verify update with 'bundle show rack'.

🔧 Temporary Workarounds

Rate Limiting

all

Implement request rate limiting to prevent DoS attacks

# Use Rack::Attack or similar middleware
# Configure maximum requests per IP/time period

Request Validation

all

Filter or reject requests with suspicious Content-Disposition headers

# Add middleware to inspect and reject malformed headers
# Example: reject requests with Content-Disposition headers exceeding length limits

🧯 If You Can't Patch

  • Implement Web Application Firewall (WAF) rules to block requests with malformed Content-Disposition headers
  • Deploy reverse proxy with request filtering and rate limiting capabilities

🔍 How to Verify

Check if Vulnerable:

Check Rack version with 'bundle show rack' or 'gem list rack' and compare against vulnerable versions.

Check Version:

bundle show rack | grep rack

Verify Fix Applied:

Confirm Rack version is 2.0.9.2, 2.1.4.2, 2.2.4.1, or 3.0.0.1 using 'bundle show rack'.

📡 Detection & Monitoring

Log Indicators:

  • Multiple requests with similar Content-Disposition headers
  • Increased response times for multipart requests
  • Application server resource exhaustion alerts

Network Indicators:

  • Unusual patterns of multipart POST requests
  • Requests with abnormally long Content-Disposition headers

SIEM Query:

source="application.log" AND "Content-Disposition" AND (response_time>5000 OR status=500)

🔗 References

📤 Share & Export