CVE-2024-36361
MediumCVSS 6.8Summary
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. These functions compile Pug templates into JavaScript, and there would typically be no reason to allow untrusted callers.
Risk Assessment
If an application passes untrusted input to the name option, an attacker could execute arbitrary JavaScript in the server or browser context, potentially leading to application compromise.
Recommendation
Update Pug to a version later than 3.0.2 if a fix is available. Avoid passing untrusted input to the name option in the mentioned functions.
Other vulnerabilities in Pug
Original NVD description (English source)
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.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

