Prompty: Server-Side Template Injection to Remote Code Execution in the @prompty/core Nunjucks Renderer
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- Code execution
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-1336.
Summary
## Summary The 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. ## Affected packages - npm `@prompty/core` versions `<= 0.1.4` - npm `@prompty/core` versions `<= 2.0.0-beta.4` ## Impact Applications 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. ## Remediation Upgrade 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. ## Fix details The 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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | @prompty/core (npm) | before 0.1.5 | 0.1.5 | Patch available | GHSA-w28w-gp39-m4p6 |
| — | @prompty/core (npm) | 2.0.0-alpha.1 to before 2.0.0-beta.5 | 2.0.0-beta.5 | Patch available | GHSA-w28w-gp39-m4p6 |
- @prompty/core (npm) Vendor— Affected before 0.1.5 Fixed in 0.1.5 Patch available GHSA-w28w-gp39-m4p6
- @prompty/core (npm) Vendor— Affected 2.0.0-alpha.1 to before 2.0.0-beta.5 Fixed in 2.0.0-beta.5 Patch available GHSA-w28w-gp39-m4p6
Remediation
- Fix · GHSA-w28w-gp39-m4p6 @prompty/core (npm) Fixed in 0.1.5 Advisory →
- Fix · GHSA-w28w-gp39-m4p6 @prompty/core (npm) Fixed in 2.0.0-beta.5 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-w28w-gp39-m4p6
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences