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

Validate API key authorization redirects (#7721)

Public commit record

What the developer wrote

Authored by Nicolas Dorier

58/100 · Thin
Validate API key authorization redirects (#7721)
✓ Descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly! No meaningful explanatory body
The short version

What changed, and why it matters

This commit tightens how BTCPay Server validates the web address users are sent back to after authorizing an API key. Previously, the code only rejected non-absolute redirect URLs in one place and did not re-check the redirect after form submission. The new helper requires the redirect to be an absolute http:// or https:// URL and applies the same check in both the GET and POST authorization handlers. This prevents an attacker from tricking the server into redirecting a user to a malicious address or local service after authorization.

Recommended action

Review whether any other redirect parameters in the API key or OAuth-like flows bypass this helper, and confirm the `IsSafeRedirect` logic is reused consistently. Consider adding automated tests covering scheme, absolute URI, and null cases. No immediate emergency action is indicated, but deploy with the next maintenance window.

Security signals we found

01

Open redirect / unsafe redirect validation added

02

Missing server-side validation in POST handler remediated

03

Scheme whitelist introduced (http/https only)

04

Absolute URI requirement enforced

Risk score

Why this scored 67/100

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