Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2021-21353

published medium CVSS 3.1 · 6.8

Remote code execution in pug

Published
03 Mar 2021, 01:50:18 UTC
Updated
02 Nov 2026, 17:59:55 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
pugjs — pug< 3.0.1 Affected Not stated GitHub_M

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.

en · GitHub_M · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
6.8 / 10
Severity
medium
Provider
GitHub_M · cna
Vector string
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
pugjs pug < 3.0.1 (affected) GitHub_M · cna

Weaknesses

1
  • CWE-74 CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (GitHub_M · cna)

References

7

Provider assertions

3

GitHub_M · cna

Remote code execution in pug

CISA-ADP · adp

CISA ADP Vulnrichment

CVE · adp

CVE Program Container

Provenance

Schema
5.2
Searchable
yes
Content hash
6575070c787fef80cc20d2d236f9e45439ba9ec67f643d76d884f105f9e7b7e9
Ingested
02 Nov 2026, 18:05:35 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected