{"id":"GHSA-f7ph-p5rv-phw2","summary":"Cross-Site Scripting in nunjucks","details":"Affected versions of `nunjucks` do not properly escape specially structured user input in template vars when in auto-escape mode, resulting in a cross-site scripting vulnerability.\n\n## Proof of Concept\n\nBy using an array for the keys in a template var, escaping is bypassed.\n```javascript\nname[]=\u003cscript\u003ealert(1)\u003c/script\u003e\n```\n\nA full PoC is available in the references section.\n\n\n## Recommendation\n\nUpdate to version 2.4.3 or later.","aliases":["CVE-2016-10547"],"modified":"2023-11-08T03:58:11.826004Z","published":"2018-11-06T23:13:37Z","database_specific":{"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2020-06-16T21:34:04Z","nvd_published_at":null,"cwe_ids":["CWE-79"]},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2016-10547"},{"type":"WEB","url":"https://github.com/mozilla/nunjucks/issues/835"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-f7ph-p5rv-phw2"},{"type":"WEB","url":"https://github.com/matt-/nunjucks_test"},{"type":"WEB","url":"https://www.npmjs.com/advisories/147"}],"affected":[{"package":{"name":"nunjucks","ecosystem":"npm","purl":"pkg:npm/nunjucks"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.4.3"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/11/GHSA-f7ph-p5rv-phw2/GHSA-f7ph-p5rv-phw2.json"}}],"schema_version":"1.9.0"}