GHSA-w28w-gp39-m4p6

Suggest an improvement
Source
https://github.com/advisories/GHSA-w28w-gp39-m4p6
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-w28w-gp39-m4p6/GHSA-w28w-gp39-m4p6.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-w28w-gp39-m4p6
Aliases
Published
2026-07-24T16:23:59Z
Modified
2026-08-13T04:11:08Z
Severity
  • 10.0 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H CVSS Calculator
Summary
Prompty: Server-Side Template Injection to Remote Code Execution in the @prompty/core Nunjucks Renderer
Details

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.

Database specific
{
    "cwe_ids":  [
        "CWE-1336",
        "CWE-94"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-07-24T16:23:59Z",
    "nvd_published_at":  null,
    "severity":  "CRITICAL"
}
References

Affected packages

npm / @prompty/core

Package

Name
@prompty/core
View open source insights on deps.dev
Purl
pkg:npm/%40prompty/core

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.1.5

Database specific

last_known_affected_version_range
"<= 0.1.4"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-w28w-gp39-m4p6/GHSA-w28w-gp39-m4p6.json"

npm / @prompty/core

Package

Name
@prompty/core
View open source insights on deps.dev
Purl
pkg:npm/%40prompty/core

Affected ranges

Type
SEMVER
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"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-w28w-gp39-m4p6/GHSA-w28w-gp39-m4p6.json"