Skip to content
OpenAdvisories
Medium · 6.8 CVE-2024-36361 EUVD-2024-1383GHSA-3965-hpx2-q597

Pug allows JavaScript code execution if an application accepts untrusted input

Published May 24, 2024 · Updated Feb 13, 2025 · Assigned by mitre

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.

Affected packages

EcosystemPackageAffectedFixedRecord
npm pug < 3.0.3 3.0.3 GHSA-3965-hpx2-q597
npm pug-code-gen < 3.0.3 3.0.3 GHSA-3965-hpx2-q597

References