AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
High 77 Bitcoin

Enforce API key permission scope (#7684)

Public commit record

What the developer wrote

Authored by Andrew Camilleri

53/100 · Thin
Enforce API key permission scope (#7684)
✓ Descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes a permission-handling bug in BTCPay Server's Greenfield API. Previously, an API key that was only supposed to manage a single store could be used to create or request broader, server-wide permissions it did not actually have. The change now checks every requested permission against what the current key is allowed to grant, and it also tightens how store-scoped permissions are matched during authorization. In short, it stops a limited key from being upgraded into a more powerful one.

Recommended action

Treat this as a security fix and include it in the next release. Users running affected versions should upgrade promptly, especially if they issue store-scoped or restricted API keys to third parties. Review existing API keys for any that were created with broader permissions than their parent key should have allowed, and rotate them after patching.

Security signals we found

01

Privilege escalation via API key creation

02

Missing authorization check on permission grant

03

Scope confusion between store-scoped and server-wide permissions

04

Permission hierarchy not enforced before minting new keys

05

Added defensive integration tests for escalation paths

Risk score

Why this scored 77/100

Our methodology →
Potential impact 22/30
Exploitability 18/25
Stealth signal 12/15
Affected reach 13/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.