Vulnerabilities in pkg:npm/@prompty/core
PACKAGEGHSA-w28w-gp39-m4p6 is a CRITICAL (CVSS 10.0) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Prompty libraries in the npm ecosystem. The issue involves server-side template injection to remote code execution in the @prompty/core nunjucks renderer. Remediation is available by upgrading affected packages to version 0.1.5, 2.0.0-beta.5.
pkg:npm/@prompty/core
Vulnerability advisories affecting package pkg:npm/@prompty/core. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-w28w-gp39-m4p6 | - | CRITICAL | Prompty: Server-Side Template Injection to Remote Code Execution in the @prompty/core Nunjucks Renderer |
| GHSA-c4gh-rv8h-q9vw | CVE-2026-53597 | HIGH | Prompty: Arbitrary code execution via JavaScript frontmatter in TypeScript loader |
| GHSA-wxhm-2mq7-7697 | CVE-2026-53598 | HIGH | Prompty: Arbitrary file read via file reference expansion |
GHSA-w28w-gp39-m4p6 at a Glance
Security Impact
CVSS: 10.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).
How to Fix GHSA-w28w-gp39-m4p6
To remediate this vulnerability, upgrade all affected Prompty dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @prompty/core@0.1.5
npm install @prompty/core@2.0.0-beta.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @prompty/core
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-w28w-gp39-m4p6, inspect your project dependencies using npm:
npm ls @prompty/core
Analyze the terminal output to locate any version of Prompty in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.5), your application is affected.
Note: The npm ls @prompty/core command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Prompty, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-w28w-gp39-m4p6 Affected Prompty Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@prompty/core
|
npm |
< 0.1.5
|
0.1.5
|
|
@prompty/core
|
npm |
≥ 2.0.0-alpha.1
< 2.0.0-beta.5
|
2.0.0-beta.5
|
References
Frequently Asked Questions
What is GHSA-w28w-gp39-m4p6?
Which Prompty versions are affected?
What version fixes GHSA-w28w-gp39-m4p6?
Is @prompty/core affected?
What is the CVSS score of GHSA-w28w-gp39-m4p6?
What CWE is associated with GHSA-w28w-gp39-m4p6?
How can I check npm dependencies for GHSA-w28w-gp39-m4p6?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w28w-gp39-m4p6",
"modified" : "2026-07-24T16:23:59Z",
"published" : "2026-07-24T16:23:59Z",
"aliases" : [ ],
"summary" : "Prompty: Server-Side Template Injection to Remote Code Execution in the @prompty/core Nunjucks Renderer",
"details" : "## Summary\nThe TypeScript Nunjucks renderer evaluated untrusted `.prompty` template bodies with unrestricted JavaScript member access. An attacker-controlled template could traverse constructor and prototype properties to execute JavaScript in the host Node.js process.\n\n## Affected packages\n- npm `@prompty/core` versions `<= 0.1.4`\n- npm `@prompty/core` versions `<= 2.0.0-beta.4`\n\n## Impact\nApplications that render untrusted, community-supplied, cloned, or LLM-generated `.prompty` files with the TypeScript runtime could allow attacker-controlled code execution with the privileges of the Node.js host process.\n\n## Remediation\nUpgrade to `@prompty/core` `2.0.0-beta.5` or later. The patched renderer sanitizes render inputs to own-data-only values, rejects constructor/prototype member traversal, and disallows template function calls. Ordinary interpolation, conditionals, loops, and own nested data properties remain supported.\n\n## Fix details\nThe fix is merged in PR #404 and includes regression coverage for default Nunjucks rendering, explicit renderer usage, unsafe member lookups, and attempted template function calls.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@prompty/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.5"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.1.4"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@prompty/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0-alpha.1"
}, {
"fixed" : "2.0.0-beta.5"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.0.0-beta.4"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/microsoft/prompty/security/advisories/GHSA-w28w-gp39-m4p6"
}, {
"type" : "WEB",
"url" : "https://github.com/microsoft/prompty/pull/404"
}, {
"type" : "WEB",
"url" : "https://github.com/microsoft/prompty/commit/047756f4c8caf91c5868eeb42520c938393277b0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/microsoft/prompty"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1336", "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-24T16:23:59Z",
"nvd_published_at" : null
}
}