Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft .prompty with ---js frontmatter
-
DeliveryDeliver file via upload or shared repo
-
ExploitVictim app loads file with @prompty/core
-
Executiongray-matter evaluates JS frontmatter
-
ImpactArbitrary code runs in host process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the target application load an attacker-controlled .prompty file through the @prompty/core TypeScript loader (versions 2.0.0-alpha.1 to 2.0.0-beta.2). The concrete prerequisite is a .prompty file whose frontmatter is fenced as executable JavaScript (a '---js' or '---javascript' block); gray-matter's executable engines must be active, which they are by default in the vulnerable loader. Limiting factors: it is not fully automatic - a user or process must be induced to load the malicious file (CVSS UI:P), so the attacker needs a delivery path for untrusted prompt files (uploads, shared repos, third-party prompt packs). No authentication is required (PR:N) and complexity is low (AC:L), but deployments that only load first-party, trusted .prompty files are not realistically exposed. |
| Impact | Signals are largely consistent toward high but not maximum urgency. The CVSS 4.0 base is 8.7 (AV:N/AC:L/AT:N/PR:N/UI:P) with full High confidentiality, integrity, and availability impact on the vulnerable system - meaning unauthenticated, low-complexity code execution, gated only by the requirement that a user or system load an attacker-controlled .prompty file (UI:P). That user-interaction dependency is the key limiter: this is not wormable, drive-by RCE but rather a supply-chain / untrusted-input execution flaw. There is no EPSS score, no CISA KEV listing, and no separately published exploit in the input, so this is not confirmed as actively exploited; however, the fix commit includes a test that demonstrates code execution, confirming the vulnerability is real and trivially triggerable given a malicious file. SSVC-style read: exploitation is 'none observed', automatable is effectively 'no' (requires delivering and loading a file), technical impact 'total'. Net: a genuine high-severity issue for anyone loading third-party or user-submitted .prompty files, but real-world risk is bounded by how untrusted the loaded prompt files are in a given deployment. |
| Exploit ScenarioDerived | An attacker publishes or submits a .prompty file (e.g. via a prompt marketplace, shared repository, plugin, or user upload) containing a '---js' frontmatter block such as require('node:fs').writeFileSync(...) or a reverse-shell payload. When a developer or an application using @prompty/core 2.0.0-beta.2 or earlier loads that file, gray-matter evaluates the frontmatter and the attacker's JavaScript runs in the host process. A working trigger is demonstrated by the test added in the fix commit, so weaponization from that pattern is straightforward. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 16, 2026
Arbitrary JavaScript execution in Microsoft's @prompty/core TypeScript loader (2.0.0-alpha.1 through 2.0.0-beta.2) allows an attacker who supplies a crafted .prompty file to run code during prompt loading. The loader passed .prompty markdown to gray-matter without disabling its executable 'js'/'javascript' frontmatter engines, so a '---js' frontmatter block is evaluated as Node.js at parse time. Exploitation requires the victim's application to load the malicious file (UI:P); no public exploit is identified at time of analysis and it is not on CISA KEV, but the fix commit ships a working proof-of-concept test.
RemediationAI
Vendor-released patch: upgrade @prompty/core (and dependent @prompty/* packages) to 2.0.0-beta.3 or later, which registers hardened js/javascript gray-matter engines that throw instead of evaluating executable frontmatter. Follow the advisory at https://github.com/microsoft/prompty/security/advisories/GHSA-c4gh-rv8h-q9vw and the fix at https://github.com/microsoft/prompty/commit/c27402da2487075be577f06aa79df627fb9d6853. If you cannot upgrade immediately, do not load .prompty files from untrusted or user-controlled sources, and pre-screen any incoming .prompty files to reject those containing a '---js' or '---javascript' frontmatter fence before passing them to the loader; the trade-off is that this manual gate is easy to bypass with encoding tricks and does not cover other gray-matter engine abuses, so it is a stopgap only. Restricting the prompt-loading process's privileges and filesystem/network access (least privilege sandboxing) limits blast radius but does not close the injection.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Prompty defines a markdown-based (.prompty) file format for LLM prompts, with YAML-style frontmatter carrying model/config metadata. The TypeScript runtime's core loader (runtime/typescript/packages/core/src/core/loader.ts) parses this frontmatter with the popular gray-matter library. gray-matter supports pluggable 'engines' and, when the frontmatter language is declared as 'js' or 'javascript' (via a '---js' fence), it evaluates that block as live JavaScript rather than treating it as inert data. The loader called matter(raw) without overriding those engines, so untrusted content reaches an interpreter. This is a textbook CWE-94 (Improper Control of Generation of Code / code injection): data crossing a trust boundary is executed instead of parsed. The fix registers custom js/javascript engines whose parse function throws, so executable frontmatter is rejected rather than run.
Know when Prompty gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Unauthenticated code execution (PR:N) via a delivered file that a user/process must load (UI:R), low complexity, full C/I/A impact within the host process (scope unchanged).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Prompty is a markdown file format (.prompty) for LLM prompts. From 2.0.0-alpha.1 until 2.0.0-beta.3, the @prompty/core TypeScript loader in runtime/typescript/packages/core/src/core/loader.ts used gray-matter without overriding executable js and javascript frontmatter engines, allowing an attacker-controlled .prompty file with ---js frontmatter to execute arbitrary JavaScript during prompt loading. This issue is fixed in version 2.0.0-beta.3.
Executive ViewAI
Microsoft's @prompty/core TypeScript loader (versions 2.0.0-alpha.1 through 2.0.0-beta.2) can execute arbitrary code from specially crafted .prompty prompt files, creating substantial risk for organizations that load prompt configurations from external or untrusted sources. Attackers could exploit this to execute malicious code in application context, potentially compromising sensitive data and critical automation workflows.
No vendor-released patch identified at time of analysis. Restrict .prompty file loading to internally-managed and cryptographically signed sources only. Disable JavaScript frontmatter engines in gray-matter library configuration. Implement strict input validation and allowlisting for all prompt file sources.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Server-side template injection leading to remote code execution in Microsoft's @prompty/core npm package (TypeScript run
Arbitrary file read in Microsoft Prompty's multi-ecosystem runtime libraries (PyPI, npm, Rust, NuGet) exposes any file r
EUVD-2026-44939
GHSA-c4gh-rv8h-q9vw
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB