Is pug 2.0 vulnerable?
npm · 5 releases from 2.0.0 to 2.0.4 · latest pug is 3.0.4 · checked 1 Nov 2026
Yes: 2 known advisories
Yes. pug 2.0.4, the last 2.0 release, is affected by 2 known security advisories (2 medium), including CVE-2024-36361, CVE-2021-21353. Upgrade to 3.0.3 or later to fix all of them.
Upgrade with:
npm install pug@3.0.3Advisories affecting pug 2.0.4
Pug allows JavaScript code execution if an application accepts untrusted input
- Affected
- <3.0.3
- Fixed in
- 3.0.3
Remote code execution via the `pretty` option.
- Affected
- <3.0.1
- Fixed in
- 3.0.1
Which of your client projects are still on pug 2.0?
NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact pug version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.
Other pug versions
Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the npm registry. Refreshed daily.