# Privileged role minting at registration

Signup or conversion endpoints that accept role fields or reuse privileged request formats to grant elevated accounts

_Area: Web access control and IDOR. Seen in 3 disclosed reports; one confirmed bounty: $20,000; latest 2026-03-31. Updated 2026-11-14._

## How it works
A registration or account-conversion path decides what privileges a new account gets from data the requester controls, or from a request format shared with a more privileged portal. The assumption that breaks is that "the caller of this endpoint is an ordinary user, so the defaults are safe." When a privileged portal reuses the same handler, or when a shared "apply defaults" routine copies a whole permission struct and strips only one field, the caller ends up holding rights they were never granted. The account is real and the token is valid; only the authorization behind it is missing.

## Where it shows up
- Signup handlers that call a shared `Apply(defaults)` and then remove a single field (e.g. Admin) instead of allow-listing [E2](https://bugbountylibrary.com/r/ghsa%3AGHSA-x8jc-jvqm-pm3f.md).
- Permission structs with execution, command, or scope-path fields copied wholesale into self-registered users [E2](https://bugbountylibrary.com/r/ghsa%3AGHSA-x8jc-jvqm-pm3f.md).
- Consumer and dealer/employee portals sharing one APIGW proxy URI and request format, so the consumer registration body is accepted by the privileged endpoint [E1](https://bugbountylibrary.com/r/blog%3Asamcurry-net-hacking-kia.md).
- Auto-conversion or auto-accept logic that checks "an existing account matches" without checking that account's type [E3](https://bugbountylibrary.com/r/h1%3A270981.md).

## How to review
Find every path that creates or upgrades an account, then ask: which fields of the resulting privilege set come from the request or from shared defaults, and which are set server-side? The invariant: a self-registered or converted account must hold only an explicit allow-list of permissions, and any role/ACL value must be resolved from server-side state, never from the request body. For shared proxies, confirm the privileged endpoint rejects the consumer registration format. For conversion flows, confirm the matched account's type is verified before it is promoted.

## How finders spotted it
- Recognized the owners-site APIGW proxy pattern, got a real dealer registration link, saw the dealer portal used the same `/apigwServlet.html` URI, and hypothesized the consumer registration body would work there; a 401 on the emailed dealer token pushed them to try it [E1](https://bugbountylibrary.com/r/blog%3Asamcurry-net-hacking-kia.md).
- Noticed a prior Admin-only signup fix, then code-read `Defaults.Apply` and the signup handler to see Execute and Commands were copied but never stripped, and traced the command handler to confirm persisted values are authoritative [E2](https://bugbountylibrary.com/r/ghsa%3AGHSA-x8jc-jvqm-pm3f.md).
- Experimented with partner account creation and noticed that creating two accounts with the same business email influenced the collaborator auto-accept flow [E3](https://bugbountylibrary.com/r/h1%3A270981.md).

## Variants seen
- Shared request format across consumer and privileged portals mints a dealer token [E1](https://bugbountylibrary.com/r/blog%3Asamcurry-net-hacking-kia.md).
- Shared defaults routine strips one privileged field, leaving execution rights [E2](https://bugbountylibrary.com/r/ghsa%3AGHSA-x8jc-jvqm-pm3f.md).
- Same-email duplicate identity satisfies an "existing account" check during auto-conversion [E3](https://bugbountylibrary.com/r/h1%3A270981.md).

## Why fixes fail
Stripping only Admin from copied defaults left Execute and Commands intact, so the earlier fix was incomplete [E2](https://bugbountylibrary.com/r/ghsa%3AGHSA-x8jc-jvqm-pm3f.md).

## Impact and severity
Ranges from full store takeover [E3](https://bugbountylibrary.com/r/h1%3A270981.md) and server compromise or lateral movement when running as root [E2](https://bugbountylibrary.com/r/ghsa%3AGHSA-x8jc-jvqm-pm3f.md), to vehicle command control and tracking via dealer API access [E1](https://bugbountylibrary.com/r/blog%3Asamcurry-net-hacking-kia.md). Impact rises with what the minted role reaches and with chaining to write/read primitives.

## Seen in real software
Open-source packages and projects, and products, where this pattern was found. If the target runs one, compare the version it runs with the fix.
- **github.com/filebrowser/filebrowser/v2 (go)** <= 2.62.1, fixed in 2.62.2: File Browser's Signup Grants Execution Permissions When Default Permissions Includes Execution (CVE-2026-34528). Report: https://bugbountylibrary.com/r/ghsa%3AGHSA-x8jc-jvqm-pm3f.md

## Evidence
- E1: https://bugbountylibrary.com/r/blog%3Asamcurry-net-hacking-kia.md
- E2: https://bugbountylibrary.com/r/ghsa%3AGHSA-x8jc-jvqm-pm3f.md
- E3: https://bugbountylibrary.com/r/h1%3A270981.md
