Reference page — cumulative record through Thursday, November 19, 2026 UTC. Reference pages update as the archive grows; only dated daily editions are immutable pages of record.
CVE-2021-21353
pugjs pug — Remote code execution in pug
AV AC PR UI S C I A CVSS EPSS %ile KEV
N H N N C H H H 9.0 .0427 91.3 —
AFFECTED
Product Versions Fixed
pug < 3.0.1 – —
TIMELINE
Dec 22 Reserved by GitHub_M
Mar 3 Published (CNA: GitHub_M)
Nov 2 EXPLOIT PUBLISHED — CVE-2021-21353 (pugjs pug). Public exploit reference added.
Nov 2 RESCORED — CVE-2021-21353 (pugjs pug). CVSS 6.8 → 9 (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.
Lifecycle
Complete event history — 4 events, chronological
| Date | Event | Detail |
| December 22, 2020 | Reserved | Reserved by GitHub_M |
| March 3, 2021 | Published | Published (CNA: GitHub_M) |
| November 2, 2026 | EXPLOIT PUBLISHED | EXPLOIT PUBLISHED — CVE-2021-21353 (pugjs pug). Public exploit reference added. |
| November 2, 2026 | RESCORED | RESCORED — CVE-2021-21353 (pugjs pug). CVSS 6.8 → 9 (NVD). |
Affected
Affected products and packages — 1 row
| Vendor | Product / Package | Ecosystem | Version introduced | Fixed |
| pugjs | pug | — | < 3.0.1 | — |
About this page
This is a reference page, not a dated page of record. It assembles the complete lifecycle of CVE-2021-21353 from the CVE Program record, NVD enrichment, the CISA KEV catalog, EPSS, and OSV advisories. The box score's numbers (CVSS, EPSS, KEV status) are current as of Thursday, November 19, 2026 UTC and are re-derived as the archive grows; only dated daily editions are immutable pages of record. The authoritative source for this identifier is cve.org.