Export permission checked globally, not against the target workspace
- Asset
- api.example.com · POST /v2/exports
- Caller
- Analyst in workspace ws_102 (synthetic Tenant A)
- Standard
- CWE-863 · OWASP API Security Top 10 2023 API1 · ASVS 5.0 V8
Impact. A user with export permission in one workspace can export another tenant's customer data by changing one body field.
Fix. Evaluate permission against the target workspace through one policy function, deny by default and add role-by-tenant regression tests.
Evidence · request → response
POST /v2/exports HTTP/1.1 Host: api.example.com Authorization: Bearer <analyst token, workspace ws_102> Content-Type: application/json {"workspace_id":"ws_317","dataset":"customers","format":"csv"}
HTTP/1.1 202 Accepted Content-Type: application/json {"export_id":"exp_88f1","workspace_id":"ws_317","status":"queued", "download_url":"https://files.example.com/exp_88f1.csv"}