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

Source: https://junglewise.ai/threats/cve-2026-53597-microsoft-prompty-code-execution-via-javascript-frontmatter-in  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-16. Updated: 2026-07-17  
License: CC BY 4.0 with a link back

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](https://junglewise.ai/threats/technologies/prompty). Vendors: [Microsoft](https://junglewise.ai/threats/vendors/microsoft), [npm](https://junglewise.ai/threats/vendors/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

  ```sh
  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

- [https://api.github.com/users/cristianstaicu](https://api.github.com/users/cristianstaicu)
- [https://github.com/cristianstaicu](https://github.com/cristianstaicu)
- [https://api.github.com/users/cristianstaicu/gists%7B/gist_id%7D](https://api.github.com/users/cristianstaicu/gists%7B/gist_id%7D)
- [https://api.github.com/users/cristianstaicu/repos](https://api.github.com/users/cristianstaicu/repos)
- [https://avatars.githubusercontent.com/u/1549455?v=4](https://avatars.githubusercontent.com/u/1549455?v=4)
- [https://api.github.com/users/cristianstaicu/events%7B/privacy%7D](https://api.github.com/users/cristianstaicu/events%7B/privacy%7D)

## Related threats

- [Microsoft Prompty server-side template injection to RCE in Nunjucks renderer](https://junglewise.ai/threats/cve-2026-73299-microsoft-prompty-server-side-template-injection-to-rce-in)
- [Microsoft Prompty path traversal in file reference expansion](https://junglewise.ai/threats/cve-2026-53598-microsoft-prompty-path-traversal-in-file-reference-expansion)
