CVE-2026-53597: Microsoft Prompty code execution via JavaScript frontmatter in TypeScript loader

CVE-2026-53597 · Severity: high · CVSS 4 · Published 2026-07-16

Microsoft Prompty is a library used for managing and loading AI prompt templates. A security vulnerability in its TypeScript loader allows an attacker to execute malicious code on a server if the application loads a specially crafted prompt file. This could lead to a full system compromise, unauthorized data access, or service disruption.

Technologies: Microsoft Prompty. Vendors: Microsoft, npm.

Quick answers

Is CVE-2026-53597 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-53597 being exploited in the wild.
How severe is CVE-2026-53597?
High severity, with a CVSS score of 4, published 16 July 2026.
Which products and versions are affected?
Microsoft Prompty >= 2.0.0-alpha.1, < 2.0.0-beta.3; @prompty/core (npm) >= 2.0.0-alpha.1, < 2.0.0-beta.3, SEMVER:introduced=2.0.0-alpha.1,fixed=2.0.0-beta.3.
Is there a fix for CVE-2026-53597?
Yes. @prompty/core (npm): upgrade to 2.0.0-beta.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-53597 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-53597?
Check whether you run Microsoft Prompty or @prompty/core (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @prompty/core (npm): upgrade to 2.0.0-beta.3 or later
    npm install @prompty/core@2.0.0-beta.3

Technical details

The vulnerability is a code injection (CWE-94) issue within the TypeScript loader of @prompty/core. The loader utilizes the 'gray-matter' library to parse frontmatter but failed to disable or override executable engines. Consequently, 'gray-matter' evaluates JavaScript blocks (e.g., ---js) by default during parsing. An attacker who can provide a malicious .prompty file or influence the path from which prompts are loaded can achieve arbitrary JavaScript execution within the host Node.js process. The issue was a regression in the v2 TypeScript rebuild and has been fixed in version 2.0.0-beta.3 by explicitly overriding the 'js' and 'javascript' engines to reject such content.

Affected products

  • Microsoft @prompty/core >= 2.0.0-alpha.1, < 2.0.0-beta.3

Identifiers

  • CVE-2026-53597
  • GHSA-c4gh-rv8h-q9vw

Timeline

  • 2026-06-06: disclosed: Reported to Microsoft
  • 2026-07-16: advisory: NVD publication date
  • 2026-07-17: patched: GitHub Advisory published and fix confirmed in 2.0.0-beta.3

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.