Skip to content

Remote Code Execution via Preview Window

Critical
wwwillchen published GHSA-7fxm-c5xx-7vpq Sep 17, 2025

Package

dyad

Affected versions

<=0.19.0

Patched versions

0.20.0

Description

Dyad RCE Vulnerability Summary

A critical security vulnerability has been discovered that affected Dyad v0.19.0 and earlier versions that allows attackers to execute arbitrary code on users' systems. The vulnerability affects the application's preview window functionality and can bypass Docker container protections.

How it Works

The vulnerability occurs when malicious content is displayed in Dyad's preview window. An attacker can craft web content that automatically executes when the preview loads. The malicious content can break out of the application's security boundaries and gain control of the system.

Attack Scenarios

Attackers could exploit this vulnerability through:

  • Malicious templates: Distributing compromised templates through Dyad's community templates
  • Indirect prompt injection: Embedding malicious content in external sources that users might reference

Impact

  • Remote Code Execution: Attackers can run arbitrary commands on the victim's computer
  • Container Escape: The vulnerability bypasses Docker protections, affecting the host system even when Dyad runs in containers

Who's Affected

Any user of Dyad v0.19.0 or earlier who previews web applications containing untrusted content. This includes users who import community templates or work with external content sources.

Remediation

This has been fixed in Dyad v0.20.0 and later. Please upgrade to the latest Dyad version as soon as possible: https://www.dyad.sh/download.

Acknowledgements

We thank @jackfromeast and @Suuuuuzy for their responsible disclosure of this vulnerability, including a proof-of-concept demonstration, and for their guidance on the remediation.

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

CVE ID

CVE-2025-58766

Weaknesses

Improper Control of Generation of Code ('Code Injection')

The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. Learn more on MITRE.

Credits