Skip to content

CVE-2023-2142 Nunjucks autoescape bypass leads to cross site scripting

MediumCVSS 6.1 EPSS 0.39%
Published
Updated
Exploit status
No public exploit known

Description

In Nunjucks versions prior to version 3.2.4, it was
possible to bypass the restrictions which are provided by the autoescape
functionality. If there are two user-controlled parameters on the same
line used in the views, it was possible to inject cross site scripting
payloads using the backslash \ character.

Affected products

ProductAffected versionsFixed in
npm nunjucks(npm) < 3.2.4 3.2.4
debian/node-nunjucks(Debian:12) All versions No fix listed
debian/node-nunjucks(Debian:12) = 3.2.3+dfsg+~cs1.0.1-3 No fix listed
debian/node-nunjucks(Debian:12) = 3.2.4+~cs4.2.7-1 No fix listed
debian/node-nunjucks(Debian:12) = 3.2.4+~cs4.2.7-2 No fix listed
debian/node-nunjucks(Debian:12) = 3.2.4+~cs4.2.7-3 No fix listed
debian/node-nunjucks(Debian:12) = 3.2.4+~cs4.2.7-4 No fix listed
debian/node-nunjucks(Debian:13) < 3.2.4+~cs4.2.7-1 3.2.4+~cs4.2.7-1
debian/node-nunjucks(Debian:14) < 3.2.4+~cs4.2.7-1 3.2.4+~cs4.2.7-1
mozilla Nunjucks < 3.2.4 3.2.4
ubuntu/node-nunjucks(Ubuntu:24.04) All versions No fix listed
ubuntu/node-nunjucks(Ubuntu:26.04) All versions No fix listed
ubuntu/node-nunjucks(Ubuntu:26.10) All versions No fix listed

References