CVE & CISA-KEV Catalog

CVE-2021-21353

MEDIUMEPSS 90th pctl
6.8
CVSS v3
NVD

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.

How to fix

Remediation Available
pugNVD
Affected:< 3.0.1Fixed in:3.0.1CVE-2021-21353derived from NVD
pug-code-genNVD
Affected:>= 3.0.0, < 3.0.2Fixed in:3.0.2CVE-2021-21353derived from NVD

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityHigh
Privileges RequiredNone
User InteractionNone
ScopeChanged

Impact

ConfidentialityNone
IntegrityHigh
AvailabilityNone

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N

Exploit Intelligence

4.27%probability of exploitation in 30 days
90thpercentile

Elevated risk: more likely to be exploited than 90% of all known CVEs.

References

Related Vulnerabilities

Other CWE-74 (Injection) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2013-2251Critical9.8100%KEVFix
CVE-2023-22527Critical9.8100%KEV + RansomFix
CVE-2019-2725Critical9.8100%KEV + RansomFix
CVE-2022-46169Critical9.8100%KEVFix
CVE-2022-35914Critical9.8100%KEV-
CVE-2019-17558High7.599%KEVFix
Embed a live status badge for CVE-2021-21353
CVE-2021-21353 severity badge

Markdown

[![CVE-2021-21353](https://tridentstack.com/cve/badge/CVE-2021-21353.svg)](https://tridentstack.com/cve/CVE-2021-21353)

HTML

<a href="https://tridentstack.com/cve/CVE-2021-21353"><img src="https://tridentstack.com/cve/badge/CVE-2021-21353.svg" alt="CVE-2021-21353"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-05-27.