{"id":"GHSA-c4gh-rv8h-q9vw","revision":"06e142efb2e04c048ce3de6e83f14fe9","records":[{"revision":"06e142efb2e04c048ce3de6e83f14fe9","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-c4gh-rv8h-q9vw","aliases":["CVE-2026-53597"],"title":"Prompty: Arbitrary code execution via JavaScript frontmatter in TypeScript loader","description":"## Summary\nThe 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.\n\n## Affected package\n- npm `@prompty/core` v2 prerelease line: `>= 2.0.0-alpha.1 < 2.0.0-beta.3`\n- Fixed in `@prompty/core@2.0.0-beta.3`\n\nThe 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`.\n\n## Impact\nApplications 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.\n\n## Remediation\nUpgrade `@prompty/core` to `2.0.0-beta.3` or later.\n\nThe 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.\n\n## Fix details\nFixed by commit `c27402da2487075be577f06aa79df627fb9d6853` and released via `typescript/2.0.0-beta.3`.","state":0,"publishedAt":"2026-07-17T19:53:34+00:00","modifiedAt":"2026-07-17T20:00:17.099953+00:00","affected":[{"ecosystem":"npm","name":"@prompty/core","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.0.0-alpha.1"},{"kind":"fixed","version":"2.0.0-beta.3"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/microsoft/prompty/security/advisories/GHSA-c4gh-rv8h-q9vw","https://nvd.nist.gov/vuln/detail/CVE-2026-53597","https://github.com/microsoft/prompty/commit/c27402da2487075be577f06aa79df627fb9d6853","https://github.com/microsoft/prompty"],"sourceUrl":"https://github.com/advisories/GHSA-c4gh-rv8h-q9vw","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-c4gh-rv8h-q9vw","identifiers":["GHSA-c4gh-rv8h-q9vw","CVE-2026-53597"]},"retained":false,"historicalAffected":[]}],"coverage":[]}