Skip to content
Access control Write-up Intermediate

Why Bug Hunters Skip Role-Based API Testing (And How I Turned a W

A Writer-role API token could create, read, update and delete account-level webhooks that should have required Admin rights. Because the platform called the webhook URL immediately on creation or update, the Writer could also make the server send requests to arbitrary addresses, including cloud metadata, confirming SSRF.

CypherNova1337 Follow

Published on infosecwriteups.com

Most hunters test authentication. Almost nobody tests authorization at the role level.

CypherNova1337, on infosecwriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The webhook management endpoints checked that a token was valid but did not enforce the Admin role, so Writer tokens were accepted for account-level actions.

Impact

A Writer could manage account-wide webhooks, read all API tokens and the audit log, and cause the platform's production infrastructure to send requests to arbitrary URLs, including cloud metadata endpoints; the text does not confirm whether metadata credentials were actually retrieved.

What the attacker needed

A Writer-role API token; webhook feature enabled on the account

The fix

The webhook endpoints should enforce Admin-only access for create, update and delete, matching the 403 already returned to Reader tokens.

How it was found

  1. Create Reader, Writer and Admin API tokens for two test accounts.
  2. Send a webhook creation request with the Writer token and observe a 201 response.
  3. Confirm the Reader token is correctly blocked with 403 on the same request.
  4. Use the Writer token to read, update and delete webhooks, and to access integrations, tokens and the audit log.
  5. Create a webhook pointing to an out-of-band listener and patch its URL, then observe inbound DNS and HTTP interactions.
  6. Patch the webhook URL to the cloud metadata address and see the URL accepted.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A platform gave users different roles, such as Reader, Writer and Admin, to limit what each can do. The Writer role was meant only to manage project settings, but the webhook feature, which belongs to the whole account, accepted Writer tokens. That let a lower-privileged user change account-wide settings and make the server contact addresses of their choosing.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by CypherNova1337

View all

12 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.