Description
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.
Recommendation
Update the pug package to the latest compatible version. Followings are version details:
- Affected version(s): <= 3.0.2
- Patched version(s): 3.0.3
References
Could your website be exposed too?
SmartScanner can check your website for Pug allows JavaScript code execution if an application accepts untrusted input and gives you actionable findings to investigate.
Start a free scanRelated Issues
- javascript-deobfuscator crafted payload can lead to code execution - CVE-2024-36120
- DocsGPT Allows Remote Code Execution - CVE-2025-0868
- dom-iterator code execution vulnerability - CVE-2024-21541
- HAX CMS: Stored XSS via '<video-player>' component allows arbitrary JavaScript execution and token theft - CVE-2026-46496


