Description
In app/models/subscribers_import.rb:14-25, CSV.parse(f.read, headers: false) loads the entire CSV file into memory with no file size validation.
Risk
A large CSV upload could exhaust server memory (DoS).
Recommendation
- Validate file size before processing (e.g., max 5MB)
- Use streaming CSV parsing (
CSV.foreach) instead of loading all at once
Severity
Medium