CVE-2024-46242
📋 TL;DR
This vulnerability allows attackers to cause a denial of service (DoS) by submitting specially crafted email addresses during user registration in CTFd. The crafted string triggers inefficient regular expression processing that consumes excessive server resources. All CTFd instances running version 3.7.3 with user registration enabled are affected.
💻 Affected Systems
- CTFd
⚠️ Manual Verification Required
This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.
Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).
🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.
- Review the CVE details at NVD
- Check vendor security advisories for your specific version
- Test if the vulnerability is exploitable in your environment
- Consider updating to the latest version as a precaution
⚠️ Risk & Real-World Impact
Worst Case
Complete service unavailability due to CPU exhaustion from ReDoS attacks, preventing legitimate users from accessing the CTF platform.
Likely Case
Degraded performance and intermittent service disruptions during registration attempts, potentially affecting ongoing CTF competitions.
If Mitigated
Minimal impact with proper rate limiting and input validation controls in place.
🎯 Exploit Status
Exploitation requires no authentication and can be performed via standard registration forms. Attack complexity is low as the payload is a specially crafted email string.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: CTFd 3.7.4 or later
Vendor Advisory: http://ctfd.com
Restart Required: No
Instructions:
1. Backup your CTFd instance. 2. Update CTFd to version 3.7.4 or later. 3. Verify the update by checking the version in the admin panel.
🔧 Temporary Workarounds
Disable User Registration
allTemporarily disable new user registration to prevent exploitation while patching.
Set REGISTRATION_VISIBILITY = 'private' in config.py
Implement Rate Limiting
allAdd rate limiting to registration endpoints to limit impact of ReDoS attempts.
Configure web server rate limiting (e.g., nginx limit_req) or application-level throttling
🧯 If You Can't Patch
- Implement strict input validation to reject malformed email addresses before regex processing
- Deploy WAF rules to block suspicious registration patterns containing regex attack payloads
🔍 How to Verify
Check if Vulnerable:
Check CTFd version in admin panel or via 'pip show CTFd' command. If version is exactly 3.7.3, the system is vulnerable.
Check Version:
pip show CTFd | grep Version
Verify Fix Applied:
Verify CTFd version is 3.7.4 or later. Test registration with various email formats to ensure normal processing.
📡 Detection & Monitoring
Log Indicators:
- Multiple failed registration attempts with unusual email patterns
- High CPU usage spikes coinciding with registration requests
- Registration endpoint response time anomalies
Network Indicators:
- Unusual volume of POST requests to /register endpoint
- Registration requests containing email addresses with excessive special characters or repetition patterns
SIEM Query:
source="ctfd.log" AND (uri_path="/register" OR endpoint="register") AND (status=400 OR status=429) | stats count by src_ip