Remote Code Execution (RCE)

Affecting pug package, versions <3.0.1

Report new vulnerabilities
Do your applications use this vulnerable package? Test your applications

Overview

pug is an A clean, whitespace-sensitive template language for writing HTML

Affected versions of this package are vulnerable to Remote Code Execution (RCE). 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.

Remediation

Upgrade pug to version 3.0.1 or higher.

References

CVSS Score

8.1
high severity
  • Attack Vector
    Network
  • Attack Complexity
    High
  • Privileges Required
    None
  • User Interaction
    None
  • Scope
    Unchanged
  • Confidentiality
    High
  • Integrity
    High
  • Availability
    High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Credit
CykuTW
CVE
CVE-2021-21353
CWE
CWE-94
Snyk ID
SNYK-JS-PUG-1071616
Disclosed
10 Feb, 2021
Published
01 Mar, 2021