# GHSA-5q8v-j673-m5v4: Firefly III user API endpoints expose all users' information to any authenticated user (IDOR)

> Any authenticated user can access all user account details, including emails and roles, due to missing authorization checks on API endpoints.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 7 Mar 2026

## What is GHSA-5q8v-j673-m5v4?

GHSA-5q8v-j673-m5v4 is a missing authorization vulnerability in grumpydictator/firefly-iii, published on 7 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Summary

The 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.

### Affected Endpoints

1. **GET /api/v1/users** (UserController::index, line 94) — Lists ALL users with full details. No role check.
2. **GET /api/v1/users/{id}** (UserController::show, line 126) — Shows any user's details by ID. No role check.

### Root Cause (1-of-N Inconsistency)

Other methods in the same controller properly check for the 'owner' role:

- `store()` — `UserStoreRequest::authorize()` checks `auth()->user()->hasRole('owner')` ✓
- `destroy()` — Explicitly checks `$this->repository->hasRole($admin, 'owner')` ✓

But `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.

### Exposed Data

The `UserTransformer` (line 40-54) returns:
- `email` — user's email address
- `role` — user's role (owner/demo)
- `blocked` — account blocked status
- `blocked_code` — block reason
- `created_at` / `updated_at` — timestamps

### Impact

Any authenticated user can:
1. Enumerate ALL user accounts in the instance
2. Harvest email addresses for phishing/social engineering
3. Identify admin/owner accounts by role
4. Determine which accounts are blocked

### Exploitation

```bash
# List all users
curl -H "Authorization: Bearer <any_user_token>" https://instance/api/v1/users

# View specific user details
curl -H "Authorization: Bearer <any_user_token>" https://instance/api/v1/users/1
```

### Suggested Fix

Add owner role checks to `index()` and `show()`, or restrict the route group with admin middleware:

```php
// Option 1: Add check in controller methods
public function show(User $user): JsonResponse
{
    if (!$this->repository->hasRole(auth()->user(), 'owner') && auth()->user()->id !== $user->id) {
        throw new FireflyException('200025: No access to function.');
    }
    // ...
}

// Option 2: Add middleware to route group
Route::group(['middleware' => ['admin'], ...], ...)
```

## Which versions are affected by GHSA-5q8v-j673-m5v4?

2 open source packages ship an affected version, including grumpydictator/firefly-iii.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `grumpydictator/firefly-iii` | Packagist | From 6.4.23 | 6.5.1 |
| `grumpydictator/firefly-iii` | Packagist | From 6.4.23 | 6.5.1 |

## How do I fix GHSA-5q8v-j673-m5v4?

Upgrade grumpydictator/firefly-iii to 6.5.1 or later.

## Is GHSA-5q8v-j673-m5v4 being exploited?

There is no known exploitation of GHSA-5q8v-j673-m5v4 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-5q8v-j673-m5v4 and fix it if it is affected.

What it is: GHSA-5q8v-j673-m5v4 is a missing authorization vulnerability in grumpydictator/firefly-iii, published on 7 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-5q8v-j673-m5v4 in the wild and no public exploit code.

Affected packages and fixed versions:
- grumpydictator/firefly-iii (Packagist): affected from 6.4.23; fixed in 6.5.1
- grumpydictator/firefly-iii (Packagist): affected from 6.4.23; fixed in 6.5.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-5q8v-j673-m5v4/ (Markdown: https://insights.sbomify.com/GHSA-5q8v-j673-m5v4/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-5q8v-j673-m5v4

---
From sbomify Insights: https://insights.sbomify.com/GHSA-5q8v-j673-m5v4/
Summaries are generated and may contain mistakes; the official description above is the record.
