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

High 8.7 Published Updated

Attackers can execute arbitrary JavaScript by crafting malicious .prompty files with executable frontmatter, affecting users of the Prompty TypeScript loader.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-53597?

CVE-2026-53597 is a high-severity code injection vulnerability in microsoft prompty, published on 16 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-94

Which versions are affected by CVE-2026-53597?

2 open source packages ship an affected version, including @prompty/core.

PackageAffectedFixed in
@prompty/core npmFrom 2.0.0-alpha.12.0.0-beta.3
@prompty/core npmFrom 2.0.0-alpha.12.0.0-beta.3

How do I fix CVE-2026-53597?

Upgrade @prompty/core to 2.0.0-beta.3 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-53597 being exploited?

There is no known exploitation of CVE-2026-53597 in the wild and no public exploit code.

Sources

Also known as GHSA-c4gh-rv8h-q9vw.

Is CVE-2026-53597 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free