Vulnerability library
Security checkMay 28, 2025

Remote code execution via the `pretty` option.

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmpug

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

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.

Recommendation

Update the pug package to the latest compatible version. Followings are version details:

  • Affected version(s): < 3.0.1
  • Patched version(s): 3.0.1

References

Could your website be exposed too?

SmartScanner can check your website for Remote code execution via the `pretty` option. and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated May 28, 2025