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://nodesecurity.io/advisories/147
https://github.com/mozilla/nunjucks/issues/835
https://github.com/matt-/nunjucks_test
Related Vulnerabilities
CVE-2021-27850 Vulnerability in maven package org.apache.tapestry:tapestry-core
CVE-2023-25345 Vulnerability in npm package swig-templates
CVE-2023-29206 Vulnerability in maven package org.xwiki.platform:xwiki-platform-skin-skinx
CVE-2022-43427 Vulnerability in maven package com.compuware.jenkins:compuware-topaz-for-total-test