mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 16:08:56 +00:00
The studio API is unauthenticated and loopback binding is the only mitigation (F-001). CORS-safelisted POSTs (text/plain, form data) are sent without a preflight, so any website open in the user's browser could create and upload project files and trigger renders while hyperframes preview runs. Add a guard in createStudioApi: non-GET requests are refused with 403 when the Origin host does not match the request Host, when the Origin is unparseable (including the opaque literal null), or when Fetch Metadata marks the request cross-site. Requests with no Origin header (curl, tests, in-process callers) and all reads are unaffected.