realms-shim

1 posts

figma

An update on plugin security | Figma Blog (opens in new tab)

Figma disclosed vulnerabilities in the third-party Realms shim used to sandbox plugins. Although the vulnerabilities could have allowed plugins to escape their security boundaries, Figma found no evidence of exploitation after auditing published plugins. The company patched the issues, paused plugin publishing, and replaced the Realms shim with QuickJS running in WebAssembly. ## Plugin Security Boundaries Figma designed plugins so they can: - Run only after explicit user action. - Display UI in a plugin-specific dialog. - Read and modify data in the current Figma document. - Communicate with external internet services. Plugins should not be able to: - Run automatically or access data when inactive. - Obtain project or team information. - Read files other than the one in which they were launched. - Modify Figma’s interface outside their own dialog. Organization-tier administrators can also restrict plugin use through an allowlist. ## Response to the Vulnerabilities The Realms shim vulnerabilities could have allowed sandboxed code to bypass these restrictions. - Figma halted publication of new plugins and updates to existing plugins. - Existing plugin updates were disabled because live code changes propagate immediately to open clients. - Figma applied the publicly disclosed patch as soon as Agoric released it. - Privately disclosed vulnerabilities were fixed before the coordinated public disclosure. - Figma audited published plugins and found no evidence that the flaws had been exploited. Figma clarified that manual plugin review focuses primarily on user experience. Security is enforced through sandboxing rather than relying on human review, which can miss malicious behavior. ## Replacing the Realms Shim Figma permanently changed its plugin execution technology: - The Realms shim was removed entirely. - Plugins now run using QuickJS, a JavaScript virtual machine written in C and compiled to WebAssembly. - Figma’s architecture allowed the implementation to be swapped quickly because QuickJS had already been prepared as a backup. - The newly discovered Realms-specific vulnerability class no longer applies to the new implementation. Figma’s approach demonstrates the importance of defense-in-depth: sandboxing should enforce security boundaries, while rapid patching, controlled disclosure, plugin audits, and an interchangeable runtime architecture limit the impact of third-party vulnerabilities.