Data export rate-limited to prevent harvesting abuse
Why it matters
An unthrottled data export endpoint is an unauthenticated bulk-data harvesting vector. A malicious actor with a valid session token — or a compromised account — can trigger unlimited export jobs, each generating a complete archive of user PII. CWE-770 (allocation of resources without limits) applies directly. Even without malicious intent, runaway export requests can exhaust database connections and background job queues. OWASP A05:2021 (Security Misconfiguration) includes absent rate limiting on sensitive endpoints.
Severity rationale
Low because exploitation requires an authenticated session, but the potential damage — bulk export of an entire account's PII with no throttle — justifies the control.
Remediation
Enforce a per-user quota on export requests using Redis or a data_export_jobs table with a lookback window. In your export route (src/app/api/account/export/route.ts):
async function checkExportQuota(userId: string) {
const recentExport = await db.dataExportJob.findFirst({
where: {
userId,
requestedAt: { gte: new Date(Date.now() - 24 * 60 * 60 * 1000) }
}
});
if (recentExport) {
throw new TooManyRequestsError('Export quota: 1 per 24 hours. Try again tomorrow.');
}
}
Return HTTP 429 with a Retry-After header so API clients handle the limit gracefully. Document the quota in the user-facing help text on the export UI.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Community Privacy & Controls Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-770 — Allocation of Resources Without Limits or Throttling
- owasp:2021 · A05 — Security Misconfiguration — missing rate limiting
- soc2:2017 · CC6.7 — Restriction of information transmission, movement, and removal
Taxons
History
- 2026-04-18·v1.0.0·Initial import from community-privacy-controls·automated
- 2026-07-06·v1.0.1·Add SOC 2 TSC mapping (CC6.7) from the verified compliance crosswalk register (docs/compliance/).·by soc2-mapping-enrichment-ship-2