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

Add dedicated permission and CSRF protection for invoice status changes (#7643)

Public commit record

What the developer wrote

Authored by Nicolas Dorier

58/100 · Thin
Add dedicated permission and CSRF protection for invoice status changes (#7643)
✓ Specific, 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 hardens BTCPay Server's invoice status changes. Previously, marking an invoice as settled or invalid required the broad 'modify invoices' permission and the web UI action ignored CSRF protection. The patch adds a dedicated, narrower permission for status changes and requires anti-forgery validation on the web UI endpoint, reducing the risk that a malicious web page or overly permissioned API key can flip invoice states.

Recommended action

Treat this as a security hardening patch and include it in the next release. Review existing API keys and user roles to ensure the new `CanManageInvoiceStatus` permission is granted only where needed, since `CanModifyInvoices` now implicitly includes it. No immediate incident response is indicated by the commit alone.

Security signals we found

01

Removal of [IgnoreAntiforgeryToken] from state-changing UI action

02

Addition of dedicated fine-grained permission for invoice status mutation

03

Authorization policy narrowed from CanModifyInvoices to CanManageInvoiceStatus

04

Anti-forgery token included in UI component and sent by JavaScript fetch

05

New unit tests asserting required policy and antiforgery validation

Risk score

Why this scored 74/100

Our methodology →
Potential impact 22/30
Exploitability 18/25
Stealth signal 10/15
Affected reach 12/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.