Skip to content
DemoA made-up account, acme. Its deep scan of acme/api replays on a loop, sped up. Nothing here is real or saved.Back to the siteGet started
Agent Cernis
highmedium confidenceCWE-285broken access controlOpen

Admin CSV export trusts the orgId in the query string

src/admin/export.ts:58Path confirmed

Impact

An admin of one organisation can export the full member list, with emails and last-login IPs, of any other organisation by changing orgId in the URL.

AttackerAn admin of any organisation
Crossesthe organisation scope on admin routes
Getsother organisations' member exports

Attack path

2 steps
  1. Step 1: src/admin/export.ts:51Entry
    requireAdmin checks the caller is an admin somewhere, not of which org.
    50router.get("/admin/export", requireAdmin, exportMembers);
  2. Step 2: src/admin/export.ts:58Sink
    orgId is taken from the query string and passed to the query.
    57const rows = await members.forOrg(req.query.orgId as string);

Fix

Use the organisation from the admin's session, or check membership of the requested org before exporting.