> So what would a secure implementation of this feature look like? The webserver listening in on "localhost:19421" should implement a REST API and set a "Access-Control-Allow-Origin" header with the value "https://zoom.us". This will ensure that only Javascript running on the zoom.us domain can talk to the localhost webserver.
"Access-Control-Allow-Origin" doesn't block the request from going through, it just prevents wrong-origin Javascript from accessing the response.
The original vulnerability actually just a slight variant of cross-site request forgery (CSRF) -- "wrong site request forgery" :-)
For the localhost server to detect wrong-site requests, there are two simple options:
1. Use a CSRF token. This requires a shared secret between the localhost server and the Zoom website.
2. Check the "Origin" header. This requires that the request be an HTTP POST, which is what they should be.
(Note: If you're determined to use some CORS machinery, you could build something more complicated based on pre-flight requests, but there's no point.)