CVE-2023-25578
📋 TL;DR
CVE-2023-25578 is a denial-of-service vulnerability in Starlite ASGI framework where unauthenticated attackers can send specially crafted multipart requests to consume excessive CPU and memory resources. This affects applications with request handlers that accept multipart body data. Attackers can block worker processes and cause out-of-memory conditions.
💻 Affected Systems
- Starlite ASGI framework
📦 What is this software?
Starlite by Starliteproject
⚠️ Risk & Real-World Impact
Worst Case
Complete service outage through resource exhaustion, leading to application crashes and extended downtime.
Likely Case
Significant performance degradation and intermittent service disruptions affecting legitimate users.
If Mitigated
Minimal impact with proper rate limiting, request size limits, and updated software.
🎯 Exploit Status
Simple to exploit by sending many multipart requests; no authentication required.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.51.2
Vendor Advisory: https://github.com/starlite-api/starlite/security/advisories/GHSA-p24m-863f-fm6q
Restart Required: Yes
Instructions:
1. Update Starlite: pip install --upgrade starlite==1.51.2
2. Restart all application instances
3. Verify the update with: pip show starlite
🔧 Temporary Workarounds
Implement request size limits
allConfigure ASGI server or reverse proxy to limit multipart request sizes
# For nginx: client_max_body_size 10m;
# For uvicorn/gunicorn: configure appropriate limits
Rate limit multipart endpoints
allApply rate limiting to endpoints accepting multipart data
# Example using middleware or API gateway configuration
🧯 If You Can't Patch
- Disable multipart endpoints if not required
- Implement WAF rules to block excessive multipart requests
🔍 How to Verify
Check if Vulnerable:
Check if Starlite version <1.51.2 and application uses multipart body handlers
Check Version:
pip show starlite | grep Version
Verify Fix Applied:
Confirm Starlite version is 1.51.2 or later
📡 Detection & Monitoring
Log Indicators:
- High CPU/memory usage spikes
- Multiple large multipart requests from single IPs
- Out-of-memory errors in application logs
Network Indicators:
- High volume of POST requests with Content-Type: multipart/form-data
- Unusually large request bodies
SIEM Query:
source=app_logs ("multipart" OR "Body") AND ("high memory" OR "CPU spike" OR "OOM")
🔗 References
- https://github.com/starlite-api/starlite/commit/9674fe803628f986c03fe60769048cbc55b5bf83
- https://github.com/starlite-api/starlite/releases/tag/v1.51.2
- https://github.com/starlite-api/starlite/security/advisories/GHSA-p24m-863f-fm6q
- https://github.com/starlite-api/starlite/commit/9674fe803628f986c03fe60769048cbc55b5bf83
- https://github.com/starlite-api/starlite/releases/tag/v1.51.2
- https://github.com/starlite-api/starlite/security/advisories/GHSA-p24m-863f-fm6q