-
Notifications
You must be signed in to change notification settings - Fork 29
[BUG] API Has No Rate Limiting #219
Copy link
Copy link
Closed
Labels
Description
Project
vgrep
Description
The vgrep server API has no rate limiting. Combined with the CORS issue (allows any origin), this means:
- Any client can make unlimited requests
- DoS attacks are trivial
- Embedding generation is CPU-intensive and can be abused
- Memory exhaustion possible via embed_batch
Error Message
None - missing security feature.Debug Logs
System Information
- Bounty Version: 0.1.0
- OS: Ubuntu 24.04 LTS
- Rust: 1.75+Screenshots
No response
Steps to Reproduce
# Start server
vgrep serve
# Flood with requests (will consume all CPU)
for i in {1..1000}; do
curl -X POST http://127.0.0.1:7777/embed \
-H "Content-Type: application/json" \
-d '{"text": "very long text..."}' &
doneExpected Behavior
- Rate limit requests per IP/client
- Limit concurrent requests
- Limit request size/complexity
- Return 429 Too Many Requests when exceeded
Actual Behavior
- No rate limiting
- Unlimited concurrent requests
- CPU/memory can be exhausted
- Server becomes unresponsive
Additional Context
No response
Reactions are currently unavailable