RC RANDOM CHAOS

Zoom hacked around CORS and opened its local server to every website

Zoom's local web server used an image trick to bypass CORS, so any website, not just zoom.us, could trigger the native client and read its responses.

· 3 min read
Zoom hacked around CORS and opened its local server to every website

Zoom shipped a web server that ran on the user’s own machine, listening at localhost:19421. Load a Zoom link in a browser and the zoom.us page sent a request to that local server, telling it to launch the native client. Security researcher Jonathan Leitschuh found the part worth dwelling on: the page did not read the server’s reply with a normal AJAX request. It loaded an image, and the image’s dimensions encoded the status code, with case-switch logic mapping sizes to outcomes.

The image was a workaround for CORS. A normal request to read the local server’s response would have been subject to the browser’s cross-origin rules, so the developer reached for something the browser does not gate the same way: loading an image.

The same-origin policy does not stop a cross-origin request from being sent, and it does not stop the server from processing it. It stops the page’s JavaScript from reading the response. CORS is the server’s mechanism for relaxing that: an Access-Control-Allow-Origin header names the origins allowed to read the reply. A cross-origin request to a localhost server works fine when the server sets the right header. Anyone who has run Create React App with the frontend on one port and the API on another has relied on exactly this. The claim that browsers ignore CORS for localhost is wrong. Chrome respects CORS headers for localhost servers.

By routing around CORS with the image trick, Zoom gave up the control that would have limited which origins could read the server’s responses. The zoom.us page could trigger operations in the native client and read the response. So could every other website on the internet.

A correct version is not complicated. The server on localhost:19421 should expose a REST API and set Access-Control-Allow-Origin to https://zoom.us, so that only JavaScript running on zoom.us can talk to it. The zoom.us site should also send a Content Security Policy that blocks rendering inside an iframe, which stops a page from opening meetings silently in the background. That still leaves a page able to redirect your browser to a zoom.us meeting link you did not ask for, but the author frames that as a user-experience decision Zoom made rather than a software vulnerability.

The author argues the whole approach is wrong anyway. Clicking a link should not suddenly make your camera and microphone available to people you do not know, and good interface design is predictable. If Zoom wanted to avoid the browser’s built-in confirmation prompt, the confirmation belongs in the app, the way Google Meet handles it. A web server on localhost handing privileged functions, up to and including installing software, to any website that asks is a bad idea from the start. CORS is how you would grant that access deliberately.

The author cannot say for certain the cause was a failure to understand CORS, only that neither they nor the people they asked could find any legitimate reason for the existing design. On Reddit, lerunicorn suggested Firefox may block XHRs from secure to non-secure origins, which could explain the motivation. Firefox allows those requests when the origin is localhost. A native app can also generate its own self-signed certificate, or the feature could have shipped as a browser extension. None of these, the author concludes, is a reason to skip filtering origins.

Zoom is not alone. The author points to a steady supply of Stack Overflow answers and Express examples that recommend wide-open CORS defaults, the kind that leave an application vulnerable if copied verbatim, and notes other vendors have been caught with the same bug. The pattern is consistent: a developer wants the request to work, turning off the same-origin policy can make it work, and the cost shows up when someone notices what the server now accepts from anyone.

Share

Keep Reading

Latest on the Wire

Full wire →

New signal daily · RSS

Stay in the loop

New writing delivered when it's ready. No schedule, no spam.