Horizon Alert
Summary of the vulnerability and why it matters
This advisory concerns a vulnerability in the Prompty markdown file format rendering. The issue arises when untrusted template bodies are processed, potentially allowing for the execution of malicious JavaScript code within the host Node.js environment. The primary concern is to confirm if this technology is used and if there is any exposure.
- Vulnerability allows untrusted code execution.
- Affects developers using specific prompt templates.
- Confirm usage and assess exposure to this risk.
Attack Path
How an attacker could exploit the issue
An attacker could target systems using Prompty by tricking them into processing a malicious `.prompty` template. This template, when rendered by the Nunjucks template engine, allows the attacker to exploit JavaScript member access to navigate object constructors and prototypes. This ultimately enables the execution of arbitrary JavaScript code within the host Node.js environment, potentially leading to full system compromise.
- No authentication or user interaction needed.
- Malicious `.prompty` template processing.
- Remote code execution on host.
Live Threat
Current exploitation, exposure, and threat context
When untrusted .prompty template bodies are processed, unrestricted JavaScript member access could allow an attacker-controlled template to execute arbitrary JavaScript in the host Node.js process by traversing constructor and prototype properties. This could affect system data and service behavior when the renderer is configured to process such templates.
- Node.js process and system data.
- Untrusted template processing.
- Arbitrary JavaScript execution.
Operational Fix
Recommended remediation, mitigation, and detection steps
The Prompty renderer's unrestricted JavaScript member access, allowing remote code execution via crafted templates, necessitates action from development and platform teams. The initial focus should be on identifying all instances of the affected technology, assessing their exposure and criticality, and then assigning ownership for remediation planning.
- Own the issue: Development or Platform Teams.
- Verify first: Template processing exposure and criticality.
- Action: Plan vendor coordination and updates.