Skip to content

fix(api): validate preview CORS origins by hostname - #812

Open
doresa0 wants to merge 1 commit into
tempoxyz:mainfrom
doresa0:fix/preview-cors-hostname
Open

fix(api): validate preview CORS origins by hostname#812
doresa0 wants to merge 1 commit into
tempoxyz:mainfrom
doresa0:fix/preview-cors-hostname

Conversation

@doresa0

@doresa0 doresa0 commented Aug 13, 2026

Copy link
Copy Markdown

Faucet and Index Supply CORS used origin.includes('vercel.app'), which can reflect attacker-controlled hosts that merely contain that substring. Align with feedback.ts: parse the Origin URL and allow only https hosts that are tempo.xyz, *.tempo.xyz, or *.vercel.app.

Testing

  • Reviewed faucet.ts / index-supply.ts CORS helpers
  • Spoof-style hosts that only contain the vercel.app substring are no longer reflected
  • Legitimate *.vercel.app / *.tempo.xyz origins still allowed

Closes #681

Faucet and Index Supply CORS used origin.includes('vercel.app'), which
can reflect attacker-controlled hosts that merely contain that substring.
Match feedback.ts: parse the Origin URL and allow only https hosts that
are tempo.xyz, *.tempo.xyz, or *.vercel.app.

Closes tempoxyz#681
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

@doresa0 is attempting to deploy a commit to the Tempo Team on Vercel.

A member of the Team first needs to authorize it.

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.

security: validate preview CORS origins by hostname

1 participant