decentraland / decentraland/events
CORS allowlist regex is unanchored (vercel preview pattern)
Open
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 11
- Avg merge
- 18h 48m
- Merged PRs (30d)
- 4
Description
## Summary
`src/server.ts:53` — the CORS origin regex `/https:\/\/([a-zA-Z0-9\-_])+-decentraland1\.vercel\.app/` lacks an end anchor (`$`). Verified: `Origin: https://example-decentraland1.vercel.app.attacker.com` matches, so an attacker-controlled origin is treated as allowed.
## Impact
Cross-origin reads of the events API from attacker origins. Limited today because the events API does not use cookie-based auth (signed-fetch headers are not auto-attached cross-origin), so it mainly exposes public data — but the allowlist is unsound.
## Fix
Anchor the regex (`^...$`).
Contributor guide
Assessment
This issue has not been assessed yet.