Loading...
Skip to main content

CVE-2026-53597 — Vulnerability in @prompty/core — CVE Details

HIGH

Prompty: Arbitrary code execution via JavaScript frontmatter in TypeScript loader

Published July 17, 2026Updated July 17, 2026Source: osv

Summary

## Summary The TypeScript Prompty loader used `gray-matter` without overriding executable frontmatter engines. `gray-matter` supports JavaScript frontmatter blocks such as `---js` and evaluates them while parsing. An attacker-controlled `.prompty` file could therefore execute arbitrary JavaScript during prompt loading. ## Affected package - npm `@prompty/core` v2 prerelease line: `>= 2.0.0-alpha.1 < 2.0.0-beta.3` - Fixed in `@prompty/core@2.0.0-beta.3` The legacy v1 JavaScript runtime had a historical hardening change for this issue. During the v2 TypeScript runtime rebuild, the loader again called `gray-matter` directly and the vulnerable behavior was present in the v2 prerelease packages until `2.0.0-beta.3`. ## Impact Applications that load untrusted `.prompty` files, user-provided prompt paths, or prompt bundles from less-trusted locations could execute arbitrary JavaScript in the host Node.js process during frontmatter parsing. ## Remediation Upgrade `@prompty/core` to `2.0.0-beta.3` or later. The fix explicitly overrides the `js` and `javascript` gray-matter engines and rejects JavaScript frontmatter in `.prompty` files. Prompty frontmatter is YAML-only; executable frontmatter is unsupported. A regression test now verifies that `---js` frontmatter is rejected and not evaluated. ## Fix details Fixed by commit `c27402da2487075be577f06aa79df627fb9d6853` and released via `typescript/2.0.0-beta.3`.

Advisory Timeline

  • First published July 17, 2026 (87 days ago).
  • Last revised July 17, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update @prompty/core to 2.0.0-beta.3 or later
npm install @prompty/core@2.0.0-beta.3

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
@prompty/core
npm
All versions2.0.0-beta.3

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
P
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2026-53597?
Prompty: Arbitrary code execution via JavaScript frontmatter in TypeScript loader This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
How do I check if my project is affected by CVE-2026-53597?
CVE-2026-53597 affects @prompty/core. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-53597 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.8

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-c4gh-rv8h-q9vw

Related CVEs

  • CVE-2026-73299
    CRITICAL

    Prompty: Server-Side Template Injection to Remote Code Execution in the @prompty/core Nunjucks Renderer

  • CVE-2026-107375
    HIGH

    JHipster: SQL Injection in the Parameter of JHipster-Generated Reactive (WebFlux + R2DBC) Applicationssort

  • CVE-2026-107384
    HIGH

    MariaDB Connector/Node.js: SQL injection through object keys in SET expansion (permitSetMultiParamEntries)

  • CVE-2026-53598
    HIGH

    Prompty: Arbitrary file read via file reference expansion

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies