{"id":"GHSA-5q8v-j673-m5v4","aliases":["GHSA-5q8v-j673-m5v4"],"related":[],"kind":"vulnerability","state":"published","title":"Firefly III user API endpoints expose all users' information to any authenticated user (IDOR)","summary":"### Summary\n\nThe User management API endpoints (`GET /api/v1/users` and `GET /api/v1/users/{id}`) are accessible to any authenticated user without admin/owner role verification, exposing all users' email addresses, roles, and account status.\n\n### Affected Endpoints\n\n1. **GET /api/v1/users** (UserController::index, line 94) — Lists ALL users with full details. No role check.\n2. **GET /api/v1/users/{id}** (UserController::show, line 126) — Shows any user's details by ID. No role check.\n\n### Root Cause (1-of-N Inconsistency)\n\nOther methods in the same controller properly check for the 'owner' role:\n\n- `store()` — `UserStoreRequest::authorize()` checks `auth()->user()->hasRole('owner')` ✓\n- `destroy()` — Explicitly checks `$this->repository->hasRole($admin, 'owner')` ✓\n\nBut `index()` and `show()` have no role check at all. The route group at `routes/api.php:734-747` has no admin middleware, only the global `auth:api` middleware.\n\n### Exposed Data\n\nThe `UserTransformer` (line 40-54) returns:\n- `email` — user's email address\n- `role` — user's role (owner/demo)\n- `blocked` — account blocked status\n- `blocked_code` — block reason\n- `created_at` / `updated_at` — timestamps\n\n### Impact\n\nAny authenticated user can:\n1. Enumerate ALL user accounts in the instance\n2. Harvest email addresses for phishing/social engineering\n3. Identify admin/owner accounts by role\n4. Determine which accounts are blocked\n\n### Exploitation\n\n```bash\n# List all users\ncurl -H \"Authorization: Bearer <any_user_token>\" https://instance/api/v1/users\n\n# View specific user details\ncurl -H \"Authorization: Bearer <any_user_token>\" https://instance/api/v1/users/1\n```\n\n### Suggested Fix\n\nAdd owner role checks to `index()` and `show()`, or restrict the route group with admin middleware:\n\n```php\n// Option 1: Add check in controller methods\npublic function show(User $user): JsonResponse\n{\n    if (!$this->repository->hasRole(auth()->user(), 'owner') && auth()->user()->id !== $user->id) {\n        throw new FireflyException('200025: No access to function.');\n    }\n    // ...\n}\n\n// Option 2: Add middleware to route group\nRoute::group(['middleware' => ['admin'], ...], ...)\n```","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"### Summary\n\nThe User management API endpoints (`GET /api/v1/users` and `GET /api/v1/users/{id}`) are accessible to any authenticated user without admin/owner role verification, exposing all users' email addresses, roles, and account status.\n\n### Affected Endpoints\n\n1. **GET /api/v1/users** (UserController::index, line 94) — Lists ALL users with full details. No role check.\n2. **GET /api/v1/users/{id}** (UserController::show, line 126) — Shows any user's details by ID. No role check.\n\n### Root Cause (1-of-N Inconsistency)\n\nOther methods in the same controller properly check for the 'owner' role:\n\n- `store()` — `UserStoreRequest::authorize()` checks `auth()->user()->hasRole('owner')` ✓\n- `destroy()` — Explicitly checks `$this->repository->hasRole($admin, 'owner')` ✓\n\nBut `index()` and `show()` have no role check at all. The route group at `routes/api.php:734-747` has no admin middleware, only the global `auth:api` middleware.\n\n### Exposed Data\n\nThe `UserTransformer` (line 40-54) returns:\n- `email` — user's email address\n- `role` — user's role (owner/demo)\n- `blocked` — account blocked status\n- `blocked_code` — block reason\n- `created_at` / `updated_at` — timestamps\n\n### Impact\n\nAny authenticated user can:\n1. Enumerate ALL user accounts in the instance\n2. Harvest email addresses for phishing/social engineering\n3. Identify admin/owner accounts by role\n4. Determine which accounts are blocked\n\n### Exploitation\n\n```bash\n# List all users\ncurl -H \"Authorization: Bearer <any_user_token>\" https://instance/api/v1/users\n\n# View specific user details\ncurl -H \"Authorization: Bearer <any_user_token>\" https://instance/api/v1/users/1\n```\n\n### Suggested Fix\n\nAdd owner role checks to `index()` and `show()`, or restrict the route group with admin middleware:\n\n```php\n// Option 1: Add check in controller methods\npublic function show(User $user): JsonResponse\n{\n    if (!$this->repository->hasRole(auth()->user(), 'owner') && auth()->user()->id !== $user->id) {\n        throw new FireflyException('200025: No access to function.');\n    }\n    // ...\n}\n\n// Option 2: Add middleware to route group\nRoute::group(['middleware' => ['admin'], ...], ...)\n```","format":"markdown","source":"ghsa"}],"published":"2026-03-07T02:10:45.000Z","modified":"2026-03-07T02:16:37.443Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P","rating":"MEDIUM"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"type":"ecosystem","introduced":"6.4.23","status":"affected","fixed":"6.5.1"}],"ecosystem":"Packagist","package":"grumpydictator/firefly-iii","purl":"pkg:composer/grumpydictator/firefly-iii","source":"ghsa"}],"references":[{"url":"https://github.com/firefly-iii/firefly-iii/security/advisories/GHSA-5q8v-j673-m5v4","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/firefly-iii/firefly-iii","tags":["package"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5q8v-j673-m5v4","url":"https://github.com/advisories/GHSA-5q8v-j673-m5v4","licence":"CC-BY-4.0","modified":"2026-03-07T02:16:37.443Z"}],"updatedAt":"2026-11-25T22:56:31.221Z"}