MediumGHSA-3965-hpx2-q597CVE-2024-36361

Pug allows JavaScript code execution if an application accepts untrusted input

Published 24 May 2024 · Updated 10 Sept 2026

Affected packages

Affected
<3.0.3
Fixed in
3.0.3
Update to the fixed version for your release line, for example:npm install pug-code-gen@3.0.3
pugnpm
Affected
<3.0.3
Fixed in
3.0.3
Update to the fixed version for your release line, for example:npm install pug@3.0.3

Details

Pug through 3.0.2 allows JavaScript code execution if an application accepts untrusted input for the name option of the compileClient, compileFileClient, or compileClientWithDependenciesTracked function. NOTE: these functions are for compiling Pug templates into JavaScript, and there would typically be no reason to allow untrusted callers.

Is GHSA-3965-hpx2-q597 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected pug-code-gen, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.