The vulnerability is an access token disclosure caused by a chain of two weaknesses. The exploit begins when a user opens the emoji or sticker picker in a room containing a malicious pack created by an attacker.
First, in src/app/components/emoji-board/EmojiBoard.tsx, the EmojiSidebar and StickerSidebar components were responsible for displaying pack avatars. When generating the avatar URL, the code would insecurely fall back to using the raw pack.meta.avatar field if converting the primary mxc:// URL failed. An attacker could abuse this by setting the avatar URL in their malicious pack to a URL on an external server they control.
Second, the application's service worker, defined in src/sw.ts, contained a critical flaw in its fetch event listener. This listener was designed to attach the user's access token to Matrix media requests. However, it only checked if the request URL contained the substrings /_matrix/client/v1/media/download or /_matrix/client/v1/media/thumbnail, without verifying that the request was actually being sent to the user's homeserver.
When a victim's client attempted to render the malicious avatar, it made a request to the attacker's URL. The service worker intercepted this request, saw the trigger substring in the URL, and incorrectly attached the victim's Authorization bearer token to the request, sending it directly to the attacker's server. The patch resolves this by removing the insecure URL fallback in the UI components and adding strict host validation in the service worker.