Skip to content

Commit b9108cd

Browse files
1 parent 8377140 commit b9108cd

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-5q8v-j673-m5v4",
4+
"modified": "2026-03-07T02:10:45Z",
5+
"published": "2026-03-07T02:10:45Z",
6+
"aliases": [],
7+
"summary": "Firefly III user API endpoints expose all users' information to any authenticated user (IDOR)",
8+
"details": "### 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```",
9+
"severity": [
10+
{
11+
"type": "CVSS_V4",
12+
"score": "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"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "Packagist",
19+
"name": "grumpydictator/firefly-iii"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "6.4.23"
27+
},
28+
{
29+
"fixed": "6.5.1"
30+
}
31+
]
32+
}
33+
],
34+
"database_specific": {
35+
"last_known_affected_version_range": "<= 6.5.0"
36+
}
37+
}
38+
],
39+
"references": [
40+
{
41+
"type": "WEB",
42+
"url": "https://github.com/firefly-iii/firefly-iii/security/advisories/GHSA-5q8v-j673-m5v4"
43+
},
44+
{
45+
"type": "PACKAGE",
46+
"url": "https://github.com/firefly-iii/firefly-iii"
47+
}
48+
],
49+
"database_specific": {
50+
"cwe_ids": [
51+
"CWE-863"
52+
],
53+
"severity": "MODERATE",
54+
"github_reviewed": true,
55+
"github_reviewed_at": "2026-03-07T02:10:45Z",
56+
"nvd_published_at": null
57+
}
58+
}

0 commit comments

Comments
 (0)