CVE-2024-12063
📋 TL;DR
A Denial of Service vulnerability in imartinez/privategpt v0.6.2 allows attackers to crash the server by uploading files with excessively long filenames. This affects all users running the vulnerable version of PrivateGPT. The server becomes unavailable to legitimate users during the attack.
💻 Affected Systems
- imartinez/privategpt
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete service outage making PrivateGPT unavailable to all users until the server is manually restarted.
Likely Case
Temporary service disruption affecting all users of the vulnerable instance.
If Mitigated
Minimal impact with proper input validation and rate limiting in place.
🎯 Exploit Status
Exploitation requires only sending a specially crafted HTTP request with a large filename parameter.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: v0.6.3 or later
Vendor Advisory: https://huntr.com/bounties/7db0091f-cb53-4cde-aad7-7ce491dfd8d9
Restart Required: Yes
Instructions:
1. Update PrivateGPT to version v0.6.3 or later. 2. Restart the PrivateGPT service. 3. Verify the fix by testing with normal file uploads.
🔧 Temporary Workarounds
Implement filename length validation
allAdd server-side validation to reject filenames exceeding a reasonable length (e.g., 255 characters).
Rate limit file upload endpoints
allImplement rate limiting on the file upload endpoint to prevent rapid exploitation attempts.
🧯 If You Can't Patch
- Deploy a web application firewall (WAF) with rules to block requests with excessively long filenames.
- Place PrivateGPT behind a reverse proxy that filters and validates incoming requests before they reach the application.
🔍 How to Verify
Check if Vulnerable:
Check if running PrivateGPT version v0.6.2. Attempt to upload a file with a filename exceeding 1000 characters and monitor for service disruption.
Check Version:
Check the version in the PrivateGPT interface or deployment configuration files.
Verify Fix Applied:
After updating, attempt the same long filename upload test - the request should be rejected without service disruption.
📡 Detection & Monitoring
Log Indicators:
- HTTP requests with unusually long filenames in file upload logs
- Server error logs showing crashes or timeouts during file uploads
Network Indicators:
- Spike in HTTP POST requests to file upload endpoint
- Unusually large Content-Disposition headers
SIEM Query:
source="privategpt" AND (filename_length>1000 OR http_request_size>10000)