Description
Nunjucks is a full featured templating engine for JavaScript. Versions 2.4.2 and lower have a cross site scripting (XSS) vulnerability in autoescape mode. In autoescape mode, all template vars should automatically be escaped. By using an array for the keys, such as `name[]=`, it is possible to bypass autoescaping and inject content into the DOM.
Remediation
References
https://github.com/matt-/nunjucks_test
https://github.com/mozilla/nunjucks/issues/835
https://nodesecurity.io/advisories/147
Related Vulnerabilities
CVE-2020-7751 Vulnerability in npm package pathval
CVE-2021-38542 Vulnerability in maven package org.apache.james:james-server
CVE-2017-12617 Vulnerability in maven package org.apache.tomcat:tomcat-util
CVE-2020-7686 Vulnerability in npm package rollup-plugin-dev-server
CVE-2021-21348 Vulnerability in maven package com.thoughtworks.xstream:xstream