Skip to content

fix/security: block cross-host redirects - #1361

Merged
cbrnrd merged 2 commits into
mainfrom
carterbrainerd-vuln-114-cross-host-redirect-causes-oauth-bearer-token-exfiltration
Aug 13, 2026
Merged

fix/security: block cross-host redirects#1361
cbrnrd merged 2 commits into
mainfrom
carterbrainerd-vuln-114-cross-host-redirect-causes-oauth-bearer-token-exfiltration

Conversation

@cbrnrd

@cbrnrd cbrnrd commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Problem

The API client followed redirects to other hosts. These redirected requests could expose OAuth bearer tokens or custom auth-proxy headers to an untrusted server.

This addresses VULN-113 and VULN-114.

Solution

The API client now stops when a redirect points to a different host and returns the redirect response without following it. Redirects on the same host still work.

Regression tests cover OAuth tokens, custom auth-proxy headers, and same-host redirects.

Verification Evidence

  • go test ./internal/api -count=1
  • go test -race ./internal/api -run 'Test(CredentialsAreNotSentOnCrossHostRedirect|ClientFollowsSameHostRedirect)$' -count=1

@cbrnrd
cbrnrd marked this pull request as ready for review August 13, 2026 16:41
@cbrnrd
cbrnrd requested review from a team and andreeleuterio August 13, 2026 16:41
@cbrnrd
cbrnrd merged commit 2027d78 into main Aug 13, 2026
8 checks passed
@cbrnrd
cbrnrd deleted the carterbrainerd-vuln-114-cross-host-redirect-causes-oauth-bearer-token-exfiltration branch August 13, 2026 21:16
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