Not a U.S. government website. NDD is an independent vulnerability database by Volerion and is not affiliated with or endorsed by NIST or NVD.
VOLERION
Volerion Security Research

NOT DEFERRED DATABASE

VULNERABILITIES

CVE-2021-21353 Details

Description

Pug is an npm package which is a high-performance template engine. In pug before version 3.0.1, if a remote attacker was able to control the `pretty` option of the pug compiler, e.g. if you spread a user provided object such as the query parameters of a request into the pug template inputs, it was possible for them to achieve remote code execution on the node.js backend. This is fixed in version 3.0.1. This advisory applies to multiple pug packages including "pug", "pug-code-gen". pug-code-gen has a backported fix at version 2.0.3. This advisory is not exploitable if there is no way for un-trusted input to be passed to pug as the `pretty` option, e.g. if you compile templates in advance before applying user input to them, you do not need to upgrade.

Metrics

References to Advisories, Solutions, and Tools

By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.

Weakness Enumeration

CWE-IDCWE NameSource
CWE-94Improper Control of Generation of Code ('Code Injection')[email protected]
CWE-74Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')[email protected]

Affected Products

ProductVersions
pugjs pug
< 3.0.1

CPE

  • cpe:2.3:a:pugjs:pug:*:*:*:*:*:node.js:*:*

Remediation

  • No remediation found in references.
pugjs pug-code-gen
< 2.0.3
>= 3.0.0, < 3.0.2

CPE

  • cpe:2.3:a:pugjs:pug-code-gen:*:*:*:*:*:node.js:*:*

Remediation

  • No remediation found in references.

Change History

6 change records found show changes


QUICK INFO

CVE Dictionary Entry:
CVE-2021-21353
NVD Published Date:
Mar 3, 2021
NVD Last Modified:
Jun 17, 2026
Source:
[email protected]
CVE-2021-21353 Details - Not Deferred