Skip to content

fix: Validate host parameter stored in OAuth state on failure redirect#11956

Merged
tommoor merged 2 commits into
mainfrom
tommoor/fix-oauth-open-redirect
Apr 4, 2026
Merged

fix: Validate host parameter stored in OAuth state on failure redirect#11956
tommoor merged 2 commits into
mainfrom
tommoor/fix-oauth-open-redirect

Conversation

@tommoor

@tommoor tommoor commented Apr 4, 2026

Copy link
Copy Markdown
Member

Fixes implicit trust of state.host in failure redirect

Copilot AI review requested due to automatic review settings April 4, 2026 15:22

This comment was marked as resolved.

Sanitize the host parameter from OAuth state before using it in error
redirects. Adds userinfo stripping to parseDomain's normalizeUrl to
prevent bypasses like "subdomain.base@evil.com", validates custom
domains against registered teams, and introduces Team.findByDomain
with input normalization for consistent domain lookups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tommoor tommoor merged commit d4dec42 into main Apr 4, 2026
16 checks passed
@tommoor tommoor deleted the tommoor/fix-oauth-open-redirect branch April 4, 2026 20:13
NoWauu pushed a commit to NoWauu/outline that referenced this pull request May 12, 2026
outline#11956)

* fix: Validate host parameter stored in OAuth state on auth failure path

* fix: Validate OAuth state host to prevent open redirect

Sanitize the host parameter from OAuth state before using it in error
redirects. Adds userinfo stripping to parseDomain's normalizeUrl to
prevent bypasses like "subdomain.base@evil.com", validates custom
domains against registered teams, and introduces Team.findByDomain
with input normalization for consistent domain lookups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants