Skip to main content
CRITICAL

CVE-2021-21353

CVSS v3

9

CRITICAL

EPSS Score

1.3 %

exploit probability

CISA KEV

No

known exploited

Exploitation

SSVC status

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.

Technical details

Published
2021-03-03

Frequently asked questions

What is CVE-2021-21353?

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.

Is CVE-2021-21353 actively exploited?

Active exploitation of CVE-2021-21353 has not been confirmed. The EPSS score is 1.3%, indicating the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-21353?

CVE-2021-21353 has a CVSS v3 base score of 9 (CRITICAL severity).

Is CVE-2021-21353 affecting your environment?

Use isMalicious to check if any of your IPs or domains are associated with this vulnerability's IOCs.

No credit card required · 500 free checks/month · Free API key