CVE-2026-53597: CWE-94: Improper Control of Generation of Code ('Code Injection') in microsoft prompty
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.
AI Analysis
Technical Summary
The vulnerability arises from the use of the gray-matter library in the @prompty/core TypeScript loader without overriding executable JavaScript and JavaScript frontmatter engines. This allowed attacker-controlled .prompty files containing ---js frontmatter to execute arbitrary JavaScript code during prompt loading. The affected versions are from 2.0.0-alpha.1 until 2.0.0-beta.3, with the fix introduced in 2.0.0-beta.3.
Potential Impact
An attacker who can supply a malicious .prompty file with specially crafted JavaScript frontmatter can execute arbitrary JavaScript code during prompt loading. This can lead to code injection attacks, potentially compromising the environment where Prompty is used. The CVSS 4.0 base score is 8.7, indicating high severity with network attack vector, low attack complexity, no privileges required, user interaction required, and high impacts on confidentiality, integrity, and availability.
Mitigation Recommendations
A fix is available starting with version 2.0.0-beta.3. Users should upgrade to version 2.0.0-beta.3 or later to remediate this vulnerability. Since the vulnerability is in a non-cloud service component, manual upgrade is required. Patch status is confirmed by the versioning information in the description. No vendor advisory content contradicts this remediation.
CVE-2026-53597: CWE-94: Improper Control of Generation of Code ('Code Injection') in microsoft prompty
Description
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.
CVSS v4.0
Score 8.7high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises from the use of the gray-matter library in the @prompty/core TypeScript loader without overriding executable JavaScript and JavaScript frontmatter engines. This allowed attacker-controlled .prompty files containing ---js frontmatter to execute arbitrary JavaScript code during prompt loading. The affected versions are from 2.0.0-alpha.1 until 2.0.0-beta.3, with the fix introduced in 2.0.0-beta.3.
Potential Impact
An attacker who can supply a malicious .prompty file with specially crafted JavaScript frontmatter can execute arbitrary JavaScript code during prompt loading. This can lead to code injection attacks, potentially compromising the environment where Prompty is used. The CVSS 4.0 base score is 8.7, indicating high severity with network attack vector, low attack complexity, no privileges required, user interaction required, and high impacts on confidentiality, integrity, and availability.
Mitigation Recommendations
A fix is available starting with version 2.0.0-beta.3. Users should upgrade to version 2.0.0-beta.3 or later to remediate this vulnerability. Since the vulnerability is in a non-cloud service component, manual upgrade is required. Patch status is confirmed by the versioning information in the description. No vendor advisory content contradicts this remediation.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-09T19:39:52.404Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a58f9c068715ace434105cd
Added to database: 07/16/2026, 15:33:20 UTC
Last enriched: 07/24/2026, 01:06:59 UTC
Last updated: 08/30/2026, 10:52:09 UTC
Views: 42
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.