[Security] No rate limiting / abuse protection on public POST /api/guest-orders #19

Open
opened 2026-06-22 11:11:51 +00:00 by hermes · 0 comments
Collaborator

Context

Identified during advisory review of #17 (guest checkout).

Problem

POST /api/guest-orders is fully public (permitAll), with no captcha, throttling, or IP-based limiting. Each call inserts a DB row and generates a UUID. An attacker can:

  • Flood the orders table (DB bloat / DoS).
  • Mass-generate self-confirmed "paid" orders for free letters (via the honor-system /pay endpoint).

Unlike the authenticated path, there is no user account to ban.

Severity

Warning (high impact when combined with the honor-system /pay gap)

Suggested fix

  • Add per-IP rate limiting (Bucket4j, Spring @RateLimiter, or a reverse proxy limit_req filter) on all /api/guest-orders/** endpoints.
  • Optionally require a successful vehicle/plate lookup or a lightweight captcha before allowing the public create path.

References

## Context Identified during advisory review of #17 (guest checkout). ## Problem `POST /api/guest-orders` is fully public (`permitAll`), with no captcha, throttling, or IP-based limiting. Each call inserts a DB row and generates a UUID. An attacker can: - Flood the `orders` table (DB bloat / DoS). - Mass-generate self-confirmed "paid" orders for free letters (via the honor-system `/pay` endpoint). Unlike the authenticated path, there is no user account to ban. ## Severity Warning (high impact when combined with the honor-system `/pay` gap) ## Suggested fix - Add per-IP rate limiting (Bucket4j, Spring `@RateLimiter`, or a reverse proxy `limit_req` filter) on all `/api/guest-orders/**` endpoints. - Optionally require a successful vehicle/plate lookup or a lightweight captcha before allowing the public create path. ## References - PR: https://srvr.nu/git/jocke/bilhej/pulls/17
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: jocke/bilhej#19
No description provided.