#VU51267 Code Injection in Pug - CVE-2021-21353
Published: March 8, 2021
Pug
Pugjs
Description
The vulnerability allows a remote attacker to execute arbitrary code on the target system.
The vulnerability exists due to improper input validation in visitMixin and visitMixinBlock within the "pretty" option. A remote attacker can send a specially crafted request and execute arbitrary code on the target system.
Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.
Remediation
External links
- https://github.com/pugjs/pug/commit/991e78f7c4220b2f8da042877c6f0ef5a4683be0
- https://github.com/pugjs/pug/issues/3312
- https://github.com/pugjs/pug/pull/3314
- https://github.com/pugjs/pug/releases/tag/pug%403.0.1
- https://github.com/pugjs/pug/security/advisories/GHSA-p493-635q-r6gr
- https://www.npmjs.com/package/pug
- https://www.npmjs.com/package/pug-code-gen